Forum Moderators: open

Message Too Old, No Replies

adding javascript search function

to search one page of site

         

halfandhalf

5:48 pm on Oct 7, 2003 (gmt 0)

10+ Year Member



I've got one page with a long list that I'd like to be searchable. The JS code I got online works great, with one exception. I don't want the "Dropdown list" option to show up (as I'm searching only one page) but when I take the <select> and <option> out the search function doesn't work anymore. I know it has to do with the option value being the .js page, but I don't know how to fix it. Any help would be wonderous :)

<form name="srchfrm" method="get" action="engine.html" onsubmit="check(this.srchtxt);" target="_blank">
<input type="text" size=30 name="srchtxt"><br>
<select name="srchlst">
<option value="engine.js">Dropdown list</option>
</select>
<input type="submit" value="Search">
<input type="hidden" name="linkto" value="_top">
<input type="hidden" name="pageof" value="0">
</form>

RoboPal

1:24 pm on Oct 8, 2003 (gmt 0)

10+ Year Member



1) How is it suppose to be related to the forum?
2) You need to edit "check()" function if you want to make it right;
3) As a hack, replace "<select.../select>" with "<input type=hidden name="srchlst" value="engine.js"> and paypal me a buck :)