Re: Another JavaScript form submit question
by "Cyanide _7" <leo7278(at)hotmail.com>
|
Date: |
Wed, 07 Jun 2000 18:59:13 CDT |
To: |
kpurtell(at)vantagemed.net |
Cc: |
hwg-languages(at)hwg.org |
|
todo: View
Thread,
Original
|
|
im not quite sure what you mean or why you want to do this, but this should
do it:
<FORM name="myform" action="process_form.html" method="POST">
<SELECT name="OptionNumber" size="1" onChange="this.form.submit();">
<OPTION selected value="1">First</OPTION>
<OPTION value="2">Second</OPTION>
<OPTION value="3">Third</OPTION>
</SELECT>
</FORM>
- Cyanide_7
>This is a variation on the last question you folks answered, where
>selecting
>an option from a drop-down menu submitted a form, and the submission
>location was contained in the option value.
>
>This time, I'm trying to submit to the location specified with ACTION, and
>selecting from a drop-down menu just initiates the submission. My attempt
>below tries to work but can't seem to process the target URL (path).
>Numerous variations have failed ("Object doesn't support this property or
>method"). I would really appreciate a bug fix! Thank you.
>
><SCRIPT LANGUAGE="JavaScript">
>function SendTo_Page(object) {
> var path = "process_form.html";
> window.location.replace(path);
> document.myform.submit();
>}
></SCRIPT>
>
><FORM name="myform" action="process_form.html" method="POST">
> <SELECT name="OptionNumber" size="1" onChange="SendTo_Page(this)">
> <OPTION selected value="1">First</OPTION>
> <OPTION value="2">Second</OPTION>
> <OPTION value="3">Third</OPTION>
> </SELECT>
>
>Keith Purtell, Web Designer
>
>
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
HWG: hwg-languages mailing list archives,
maintained by Webmasters @ IWA