bacterozoid
10-20-2002, 11:35 PM
Well, I have a nifty search on my site, and I have one problem with it. It is case sensitive. Whatever you enter into the search bar has to be exactly how I have it in the base search file for it to come up. Here is the link:
http://www21.brinkster.com/jonshtmlhelp
The search bar on the sidebar on the left is what I am referring to. It loads from an external .js file, the source is this:
document.writeln('<br><br><form name=\"form\" method=get
action=\"javascript:void(0)\" onSubmit=\"return false\"> <p
align=\"center\"><input type=text name=srchval size=\"10\"
style=\"color: #000000\; background-color: #B4B4B4\; font-
family: arial\; font-size: 8pt\; border: 1 solid #808080\"
onChange=\"javascript:this.value=this.value.toLowerCase()
\;\"><br> <input type=submit value=\"Search\" style=\"color:
#000000\; font-family: arial\; font-size: 8pt\; background-color:
#C0C0C0\; border: 1 solid #808080\" onclick=\"search(form)
\;\"></p></form>');
(That is the script, which refers to another JS file further up in the document.)
I have integrated a code which automatically changes any text inside the search field to lower case, but the user can not submit using ENTER, which is really annoying. Any way I can either make it non-case sensetive or have the script change to lowercase on submit instead of onChange? I have worked with this before, but never got any further.
Off-topic, I do plan to get that search to appear right on the page, not in the pop-up window. Any comments on the *Incomplete* site are welcome as well as help.
Thanks a bunch!
http://www21.brinkster.com/jonshtmlhelp
The search bar on the sidebar on the left is what I am referring to. It loads from an external .js file, the source is this:
document.writeln('<br><br><form name=\"form\" method=get
action=\"javascript:void(0)\" onSubmit=\"return false\"> <p
align=\"center\"><input type=text name=srchval size=\"10\"
style=\"color: #000000\; background-color: #B4B4B4\; font-
family: arial\; font-size: 8pt\; border: 1 solid #808080\"
onChange=\"javascript:this.value=this.value.toLowerCase()
\;\"><br> <input type=submit value=\"Search\" style=\"color:
#000000\; font-family: arial\; font-size: 8pt\; background-color:
#C0C0C0\; border: 1 solid #808080\" onclick=\"search(form)
\;\"></p></form>');
(That is the script, which refers to another JS file further up in the document.)
I have integrated a code which automatically changes any text inside the search field to lower case, but the user can not submit using ENTER, which is really annoying. Any way I can either make it non-case sensetive or have the script change to lowercase on submit instead of onChange? I have worked with this before, but never got any further.
Off-topic, I do plan to get that search to appear right on the page, not in the pop-up window. Any comments on the *Incomplete* site are welcome as well as help.
Thanks a bunch!