Bruce Gust
asked on
How do I keep this function from firing?
I have a form that includes a multi select pulldown. The pulldown boasts a feature where you can input some data at the top in order to filter the list below.
Very cool!
It looks like this:
The problem, however, is that when you first input the data and hit "return," some validation scripting that's attached to the form kicks in and you wind up with this:
How can I restrict the validation code from firing to that time when the user clicks on "submit," as opposed to hitting "return?" Both "functionalities" work, I just need to ensure that they fire separately based on a "return" versus a "click."
How would I pull that off?
Here's what my form looks like:
Very cool!
It looks like this:
The problem, however, is that when you first input the data and hit "return," some validation scripting that's attached to the form kicks in and you wind up with this:
How can I restrict the validation code from firing to that time when the user clicks on "submit," as opposed to hitting "return?" Both "functionalities" work, I just need to ensure that they fire separately based on a "return" versus a "click."
How would I pull that off?
Here's what my form looks like:
<form action="#" method="get" target="_self">
<b>start date:</b> <select id="date" class="super" name="sdate"><option value=""></option><option value="...">...</option>
<option value='2015-09-06'>2015-09-06</option><option value='2015-09-05'>2015-09-05</option><option value='2015-09-04'>2015-09-04</option><option value='2015-09-03'>2015-09-03</option></select>
<b>end date:</b> <select id="edate" class="super" name="edate"><option value=""></option><option value="...">...</option>
<option value='2015-09-06'>2015-09-06</option><option value='2015-09-05'>2015-09-05</option><option value='2015-09-04'>2015-09-04</option><option value='2015-09-03'>2015-09-03</option><option value='2015-09-02'>2015-09-02</option><option value='2015-09-01'>2015-09-01</option><option value='2015-08-31'>2015-08-31</option><option value='2015-08-30'>2015-08-30</option><option value='2015-08-29'>2015-08-29</option><option value='2015-08-28'>2015-08-28</option><option value='2015-08-27'>2015-08-27</option><option value='2015-08-26'>2015-08-26</option><option value='2015-08-25'>2015-08-25</option><option value='2015-08-24'>2015-08-24</option><option value='2015-08-23'>2015-08-23</option><option value='2015-08-22'>2015-08-22</option><option value='2015-08-21'>2015-08-21</option></select> <b>region(s):</b>
<div style="position:absolute; width:203px; height:35px; margin-top:-25px; margin-left:371px;">
<select id="region" name="region"><option value="CAROLINAS/TENNESSEE">Carolinas / Tennessee</option><option value="CENTRAL TEXAS">Central Texas</option><option value="FLORIDA">Florida</option><option value="GEORGIA/ALABAMA">Georgia / Alabama</option><option value="GREAT PLAINS">Great Plains</option><option value="HOUSTON/GULF COAST">Houston / Gulf Coast</option><option value="ILLINOIS/WISCONSIN">Illinois / Wisconsin</option><option value="KANSAS/MISSOURI">Kansas / Missouri</option><option value="MICHIGAN/INDIANA/KY">Michigan / Indiana / Kentucky</option>
<option value="MOUNTAIN">Mountain</option><option value="NEW ENGLAND">New England</option><option value="NORTHERN CALIFORNIA/NEVADA">Northern California / Nevada</option><option value="NY METRO/NNJ">New York / Northern New Jersey</option><option value="PA/WV/OHIO">PA/WV/Ohio</option><option value="PACIFIC NORTHWEST">Pacific Northwest</option><option value="PHILADELPHIA">Philadelphia</option><option value="SOUTH CENTRAL">South Central</option><option value="SOUTHERN CALIFORNIA">Southern California</option><option value="SOUTHWEST">Southwest</option><option value="UPSTATE NY">Upstate NY</option><option value="WASH/BALT/V">WASH/BALT/VA</option></select>
</div>
<img src="images/spacer.gif" style="width:185px; height:10px;">
<b>rank</b> <input type="radio" name="toc" id="toc_r" value="rank" > <b>trend</b> <input type="radio" name="toc" id="toc_t" value="trend" >
<div style="position:absolute; width:100px; height:30px; margin-left:685px; margin-top:-28px;">
<input type="image" src="images/submit_button.png" alt="Submit" onclick="return IsEmpty()">
</div>
</form>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.