R
Rob Wahmann
I'm having trouble with the following code appending the form name and an
empty value to the end of the url. Can anyone tell me what's wrong? I
appreciate any tips or advice you can pass along!
Rob
// submits info like this: http://www.google.com/?select=
<script type="text/javascript">
function launchIt() {
var form = document.search;
var select = form.select;
var option = select.options[select.selectedIndex];
select.selectedIndex = 0;
form.target = option.getAttribute('name');
form.action = option.value;
form.submit();
//form.target = '';
//form.action = '';
}
</script>
<form method="get" name="search">
<select name="select" onChange="launchIt()" style="font-size:9px">
<option value="">Select Service</option>
<option value="http://www.google.com/" name="google">Google</option>
<option value="http://www.hotbot.com/" name="hotbot">Hotbot</option>
</select>
</form>
empty value to the end of the url. Can anyone tell me what's wrong? I
appreciate any tips or advice you can pass along!
Rob
// submits info like this: http://www.google.com/?select=
<script type="text/javascript">
function launchIt() {
var form = document.search;
var select = form.select;
var option = select.options[select.selectedIndex];
select.selectedIndex = 0;
form.target = option.getAttribute('name');
form.action = option.value;
form.submit();
//form.target = '';
//form.action = '';
}
</script>
<form method="get" name="search">
<select name="select" onChange="launchIt()" style="font-size:9px">
<option value="">Select Service</option>
<option value="http://www.google.com/" name="google">Google</option>
<option value="http://www.hotbot.com/" name="hotbot">Hotbot</option>
</select>
</form>