Hi,
This is a form with 2 sections within the same form. Either the users search by Criteria or the Users search by Period. Initially I had one Submit button to return the results for either search button. However they wanted 2 submit buttons which would be the mirror image of each other, but the value of the submit button would be different - "Search By" and "Sort By". On Click on the radio button for Criteria, the drop down for period is disabled. Similarly, on click of the radio button for Period, the drop-down box for Criteria is disabled.
How can I disable to the same disabling for the submit buttons. When radio button for "Period" is selected, then "Search By" submit button is disabled. Wen radio button for "Criteria" is selection, then "Sort By" submit button is disabled.
Can I do that even though both the submit buttons have the same name?
Thanks.
MY HTML code is below.
This is a form with 2 sections within the same form. Either the users search by Criteria or the Users search by Period. Initially I had one Submit button to return the results for either search button. However they wanted 2 submit buttons which would be the mirror image of each other, but the value of the submit button would be different - "Search By" and "Sort By". On Click on the radio button for Criteria, the drop down for period is disabled. Similarly, on click of the radio button for Period, the drop-down box for Criteria is disabled.
How can I disable to the same disabling for the submit buttons. When radio button for "Period" is selected, then "Search By" submit button is disabled. Wen radio button for "Criteria" is selection, then "Sort By" submit button is disabled.
Can I do that even though both the submit buttons have the same name?
Thanks.
MY HTML code is below.
Code:
<form name="frmKaizen" action="getKaizenEvents.asp" method="post" onSubmit="return submitForm(this)">
<fieldset class="fieldset1">
<legend>Search by Criteria or Period. Clear your search before starting a new search</legend>
<div class="input_spacer"></div>
<div class="input_spacer"></div>
<table class="table1" width="650" border=0 cellspacing="0" cellpadding="0">
<tr align="left">
<td bgcolor="#ececec">Search By:</td>
<td><input type="radio" name="SearchBy" value="Criteria" onClick="this.form.SelectPeriod.disabled=true; this.form.Search.disabled=false; this.form.SelectPeriod.style.backgroundcolor='#ECECEC'"> Criteria</td>
<td bgcolor="#ececec">Search By:</td>
<td><input type="radio" name="SearchBy" value="Period" onClick="this.form.Search.disabled=true; this.form.SelectPeriod.disabled=false; this.form.Search.style.backgroundcolor='#ECECEC'"> Period</td>
</tr>
<tr align="left">
<td colspan="4"> </td>
</tr>
<tr align="left">
<td bgcolor="#ececec">Search Criteria:</td>
<td>
<select name="Search" onChange="togDisplay(this.value)" disabled="true">
<option value=""> -- Select -- </option>
<option value="Keywords">Keywords</option>
<option value="StartDate">Start Date</option>
<option value="EndDate">End Date</option>
<option value="Coordinator">Coordinator</option>
</select>
</td>
<td bgcolor="#ececec">Select Period:</td>
<td>
<select name="SelectPeriod" disabled="true">
<option value=""> -- Select -- </option>
<option value="ALL"> -- All Kaizen Events -- </option>
<option value="2:2007">February, 2007 </option>
<option value="3:2007">March, 2007 </option>
<option value="4:2007">April, 2007 </option>
<option value="5:2007">May, 2007 </option>
</select>
</td>
</tr>
<tr align="left">
<td colspan="2">
<div class="input_spacer"></div>
<div id="divKeywords" style="display:none;">
<label class="label1">Keywords: </label>
<input class="hiddendiv" type="text" name="txtKeyWords" id="txtKeyWords" size=25 />
</div>
<div id="divStartDate" style="display:none;">
<label class="label1">Start Date: </label>
<input class="hiddendiv" type="text" name="txtStartDate" id="txtStartDate" size=25 onBlur="return validateStartDate();"/>
</div>
<div id="divEndDate" style="display:none;">
<label class="label1">End Date: </label>
<input class="hiddendiv" type="text" name="txtEndDate" id="txtEndDate" size=25 onBlur="return validateEndDate();"/>
</div>
<div id="divCoordinator" style="display:none;">
<label class="label1">Co-ordinator: </label>
<input class="hiddendiv" type="text" name="txtCoordinator" id="txtCoordinator" size=25 />
</div>
</td>
<td colspan="2"> </td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" name="subSearch" id="subSearch1" value =" Search By " /></td>
<td colspan="2" align="center"><input type="submit" name="subSearch" id="subSearch2" value =" Sort By " /></td>
</tr>
<tr align="center">
<td colspan="4"><input type="button" value =" Clear " onClick="document.location.reload()"/></td>
</tr>
</table>
</fieldset>
</form>