joonstar
05-20-2003, 08:34 AM
I like to make the page to go another page by selecting.
if a user selects "A", the page will go to A.php.
If a user selcts "B", the page will go to B.php.
If a user selcts "C", the page will go to C.php.
I made next code for that.
it doesn't work. but it show what is my intention.
<script language="javascript">
function go()
{
if (document.test.value == "1")
{
location.href = "A.htm;
}
else if (document.test.value == "2")
{
location.href = "B.htm";
}
else if (document.test.value == "3")
{
location.href = "C.htm";
}
}
</script>
<select name=test onchange="go()">>
<option value="1">A</option>
<option value="2">B</option>
<option value="3">c</option>
</select>
Would you help me?
if a user selects "A", the page will go to A.php.
If a user selcts "B", the page will go to B.php.
If a user selcts "C", the page will go to C.php.
I made next code for that.
it doesn't work. but it show what is my intention.
<script language="javascript">
function go()
{
if (document.test.value == "1")
{
location.href = "A.htm;
}
else if (document.test.value == "2")
{
location.href = "B.htm";
}
else if (document.test.value == "3")
{
location.href = "C.htm";
}
}
</script>
<select name=test onchange="go()">>
<option value="1">A</option>
<option value="2">B</option>
<option value="3">c</option>
</select>
Would you help me?