how do you make it so when a drop down item is selected the form is submitted?
any help is much appreciated TY!
drop down menu question
Moderator: General Moderators
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
-
kettle_drum
- DevNet Resident
- Posts: 1150
- Joined: Sun Jul 20, 2003 9:25 pm
- Location: West Yorkshire, England
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
after a google i come up with this
but it gives me the error:
Code: Select all
<?php
<select name="mapsearch" onChange="document.form.submit();" >
?>blah blah document.form is not an object or is null
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
- Vincent Puglia
- Forum Commoner
- Posts: 67
- Joined: Thu Sep 04, 2003 4:20 pm
- Location: where the World once stood
Hi,
any of the following would work:
Vinny
feyd | added
any of the following would work:
Code: Select all
<select name="mapsearch" onChange="document.formname.submit();" >
// where formname is the actual name of the form.
<select name="mapsearch" onChange="document.formsї'formname'].submit();" >
// same as above
<select name="mapsearch" onChange="document.formsї0].submit();" >
// where the form is the first form on the page -- formsї1] the second form, etc...
<select name="mapsearch" onChange="this.form.submit();" >
// feyd's suggestion and the most often used.feyd | added
Code: Select all
tags [/color]