Re: JavaScript submit on select from dropdown
by "Phil Babcock" <pbabcock(at)bgsgroup.com>
|
| Date: |
Tue, 16 May 2000 09:39:23 -0400 |
| To: |
"hwg-languages(at)hwg.org" <hwg-languages(at)hwg.org> |
| References: |
hotmail |
| |
todo: View
Thread,
Original
|
|
I made a few changes to the previous scripts, and found this to work quite
well.
<html>
<head>
<SCRIPT LANGUAGE="JavaScript">
function SendTo_Template(choice) {
alert("Your choice was "+choice);
window.location.href = choice;
return true;
}
</SCRIPT>
</HEAD>
<BODY bgcolor="#eeeeee">
<FORM name="pagechange">
<SELECT size="1" NAME="ProductNumber"
onChange="SendTo_Template(this.form.ProductNumber.options[this.form.ProductN
umber.selectedIndex].value); return true">
<OPTION >select a page</OPTION>
<OPTION value="page1.cfm">Target Page One</OPTION>
<OPTION value="page2.cfm">Target Page Two</OPTION>
<option value="testoutput.html">Home</option>
</SELECT>
</FORM>
</body></html>
Phil Babcock
Lead Web Designer
BGS Group Inc.
HWG: hwg-languages mailing list archives,
maintained by Webmasters @ IWA
This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.