Click to See Complete Forum and Search --> : anchors and radio buttons and forms, oh my!


NLP_master
07-30-2003, 07:14 PM
Hi all
New to the forum - so howdi.

I have a questionaire form with radio buttons, checkboxes and textboxes. Upon clicking on this one particular radio button, I need to move the webpage to an anchor further down the page. By surounding the radio button with <a href="#myAnchor"></a> tag, things work fine in NS and Safari on a Mac. But IE on Mac and anything on PC won't jump to the anchor. I've inserted an onClick that invokes a javascript function. Can anyone help me with code to insert in function to get the page to jump to the named anchor?

Muchos gracias in advance...

mussavcom
07-30-2003, 07:49 PM
Put this in a radio button, so when you click the radio button it will take you to an anchor whose name="bob":

onclick="myFunction('bob');"

then, here is myFunction:

function myFunction(theName)
{

document.anchors[theName].scrollIntoView();

}