Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Use A HREF tag to call up javascript action

Featured Replies

I'm having a problem getting the formatting for this next model to work in IE. I have a bunch of buttons, which are contained in lists, that call up a javascript action within the open page once clicked (to see what I'm talking about, please check out: www.db-elements.com/ahimsa/blake_babies). It looks fine in Firefox and Opera, but the right navigation system looks all weird in IE, and I'm not quite sure why. I've asked many people what the problem could be, and there are no definitive answers.

 

So I thought I would try getting rid of the buttons all together, and calling up the javascript action through the A HREF tag. I saw some tutorials online on how to go about doing this, but they don't seem to work on the fore-mentioned page. Here is the code I came across, which I tried to implement for each button in the right nav of the site, but to no avail:

<a href="java script:MyFunction();">Text to Click</a>

 

Does anybody know how I can translate the following into a A HREF tag, instead of having these links exist as buttons?

<input type="button" class="button" onclick="return toggleMe('alright')" value="Alright" />

 

Thanks in advance for any insights the community can provide.

 

Dave

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.