Select onChange submit

wxdqz

New Member
Hey there all, this may seem like a very simple question (one I could answer not long ago myself) but for some reason I can't get this to work properly. The idea is to have a dropdown submit the form every time it's changed. Here's the code:

<form action="something.cfm" method="get" name="ScheduleForm">

<select name="month_list" size="1" onChange="Javascript:document.ScheduleForm.submit()">
<option value=http://www.webdeveloper.com/forum/archive/index.php/"1" <cfif Month(ScheduleDate) is 1>selected</cfif>>January</option>
<option value="2" <cfif Month(ScheduleDate) is 2>selected</cfif>>February</option>
<option value="3" <cfif Month(ScheduleDate) is 3>selected</cfif>>March</option>
<option value="4" <cfif Month(ScheduleDate) is 4>selected</cfif>>April</option>
<option value="5" <cfif Month(ScheduleDate) is 5>selected</cfif>>May</option>
<option value="6" <cfif Month(ScheduleDate) is 6>selected</cfif>>June</option>
<option value="7" <cfif Month(ScheduleDate) is 7>selected</cfif>>July</option>
<option value="8" <cfif Month(ScheduleDate) is 8>selected</cfif>>August</option>
<option value="9" <cfif Month(ScheduleDate) is 9>selected</cfif>>September</option>
<option value="10" <cfif Month(ScheduleDate) is 10>selected</cfif>>October</option>
<option value="11" <cfif Month(ScheduleDate) is 11>selected</cfif>>November</option>
<option value="12" <cfif Month(ScheduleDate) is 12>selected</cfif>>December</option>
</select>

<input name="submit" type="submit" value="Choose Month">

</form>

Any help appreciated!
 
Back
Top