Hi there,
I have two drop down menus in a form. Onew for the "action" and the other for the "target".
Somewhere in the code below is wrong and the script doesn't function.
Can somebody help??
thank you
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<script>
function jump()
{
if (form1.choice.options[choice.selectedIndex].value == "aaa.html"
(form1.action.value="aaa.html");
else
form1.action.value="bbb.html";
if (form1.open_win.options[open_win.selectedIndex].value == "_parent")
target=_parent;
else
(target=_blank);
</script>
</head>
<body>
<form name="form1" action="" method="post">
<select name="choice" size="1">
<option value="">CHOOSE A LINK</option>
<option value="aaa.html">AAA</option>
<option value="bbb.html">BBB</option>
</select>
<input TYPE="button" VALUE="GO!" onClick="jump()">
<select name="open_win" size="1">
<option value="_parent" selected>Current window</option>
<option value="_blank">New window</option>
</select>
</form>
</body>
</html>
I have two drop down menus in a form. Onew for the "action" and the other for the "target".
Somewhere in the code below is wrong and the script doesn't function.
Can somebody help??
thank you
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<script>
function jump()
{
if (form1.choice.options[choice.selectedIndex].value == "aaa.html"
(form1.action.value="aaa.html");
else
form1.action.value="bbb.html";
if (form1.open_win.options[open_win.selectedIndex].value == "_parent")
target=_parent;
else
(target=_blank);
</script>
</head>
<body>
<form name="form1" action="" method="post">
<select name="choice" size="1">
<option value="">CHOOSE A LINK</option>
<option value="aaa.html">AAA</option>
<option value="bbb.html">BBB</option>
</select>
<input TYPE="button" VALUE="GO!" onClick="jump()">
<select name="open_win" size="1">
<option value="_parent" selected>Current window</option>
<option value="_blank">New window</option>
</select>
</form>
</body>
</html>