Re: JavaScript submit on select from dropdown

by "Cyanide _7" <leo7278(at)hotmail.com>

 Date:  Sat, 13 May 2000 19:25:59 CDT
 To:  kpurtell(at)tiw.net
 Cc:  hwg-languages(at)hwg.org
  todo: View Thread, Original
<SELECT size="1" NAME="ProductNumber"
onChange="this.form.submit();">
<OPTION value=""> </OPTION>
<OPTION value="page1.cfm">FormProcessOne</OPTION>
<OPTION value="page2.cfm">FormProcessTwo</OPTION>
</SELECT>

- Cyanide_7


>I have a form with a dropdown menu. I want the form to submit when the user
>selects an option on the menu. Here's a script that merely takes it to 
>another
>page; perhaps it can be adapted to submit the form instead?
>
><SCRIPT LANGUAGE="JavaScript">
>function goto_URL(object) {
>     window.location.href = object.options[object.selectedIndex].value;
>}
></SCRIPT>
>
><SELECT size="1" NAME="ProductNumber"
>onChange="goto_URL(this.form.ProductNumber)">
><OPTION value=""> </OPTION>
><OPTION value="page1.cfm">FormProcessOne</OPTION>
><OPTION value="page2.cfm">FormProcessTwo</OPTION>
></SELECT>
>
>  -  Keith Purtell
>     www.keithpurtell.com

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA