Hi all,
Just trying to direct the browser to a results page depending on the option
chosen by the user from the drop down box
'cboType' as in the code below. How to complete the function code
(especially the 'els.action' line) to check which option
was selected so the appropriate page will be targeted when the user clicks
the 'Search' button? Thanks Rob and Randell so far
but don't want to use radio buttons. I understand server side processing is
superior but surely a little function should
be able to do the job easily!
Penny.
<html>
<head>
<title>untitled</title>
<script type="text/javascript">
function directSearch(objForm){
var els = objForm.elements
els.action = ['artistresults1.asp','titleresults1.asp'];
return true;
}
<Form name="frmSearch" method="get" action="artistresults1.asp">
<SELECT name=cboType class=formfield id="cboType">
<option value="artist" selected>Artist </option>
<option value="title">Title </option>
</SELECT>
<input name="txtKeywords" type="text" class="formfield" id="txtKeywords"
value="" size="60" height="17">
<input name="btnSearch" type="submit" id="btnSearch"
onClick="MM_callJS('directSearch(this)')" value="Search">
</Form>
</body>
</html>