PDA

View Full Version : Javascript function help plz...!?


IBM
07-01-2002, 08:27 PM
function goto()
{
if (document.frmGoTo.webs.value=1)
location.url="#ws";
else
if (document.frmGoTo.html.value=2)
location.url="#";

I really just want to have a form's drop down list call the function goto(),above onclick , and go to the set location.url....

my problem is that it's not working..any ideas...

tamienne
07-01-2002, 08:32 PM
function goto(theURL) {

window.location = theURL;
}

<SELECT NAME="dropdown" onChange="goto(this.options[this.options.selectedIndex].value)">
<OPTION VALUE="url1"> label 1</OPTION>
<OPTION VALUE="url2"> label 2</OPTION>
<OPTION VALUE="url3"> label 3</OPTION>
</SELECT>

IBM
07-01-2002, 09:50 PM
Thankyou so much.
I'm going to try this out right away.

Thank you for the help.
Looks like it's exactly like what I'm looking to do.

IBM
07-02-2002, 03:43 AM
:D Thank you again, it's working like a charm.:thumbsup: