eaglebtc Share Posted March 6, 2002 Hey, I have a web page with a JS search engine. The search box and button are designed with CSS, and the JS uses the input (item numbers) to check a predefined list with Keys (item numbers) and matching URLs in an array. Here's the problem: When I press Enter, the search engine just reloads the same page. When I click the button, however, the engine works and loads the item number's page. What I need is for [Enter] to work as well as clicking the button. Do I use onKeypress? I heard that doesn't work with NutScrape Nappygator. Here's the code: <pre> <form name=searchform> <div align="left"> <font size="2" face="Arial, Helvetica, sans-serif"> <font color="#333333"> <font size="2" face="Arial, Helvetica, sans-serif"> <font color="#666666"> [b] <font color="#333333" class="fonts"> <span class="search">Search By Item Number</span> </font> [/b] </font> </font> </font> </font> <input style="FONT-SIZE: 7pt; COLOR: rgb(19,40,121); FONT-FAMILY: Arial; BACKGROUND-COLOR: rgb(234,226,200)" name=searchfor> <input style="color: rgb(0,0,0); background-color: rgb(255,204,51); font-family: Arial; font-size: 8pt; border=0;" onClick=checkDatabase() type=button value=search name=button> <script language=JavaScript src="key2-noparent.js" type=text/javascript> </script> </div> </form> </pre> If you'd like to test this, visit http://www.bagmasters.com and use the search engine at the bottom of the page. Try any or all of the following item numbers. Report your success in this thread. Item numbers: a570, i900, k173, h1444, q101 Link to post Share on other sites
Question
Hey,
I have a web page with a JS search engine.
The search box and button are designed with CSS,
and the JS uses the input (item numbers) to check
a predefined list with Keys (item numbers) and
matching URLs in an array.
Here's the problem:
When I press Enter, the search engine just reloads
the same page. When I click the button, however,
the engine works and loads the item number's page.
What I need is for [Enter] to work as well as clicking the button.
Do I use onKeypress? I heard that doesn't work with NutScrape Nappygator.
Here's the code:
If you'd like to test this, visit http://www.bagmasters.com and use the search engine
at the bottom of the page. Try any or all of the following
item numbers. Report your success in this thread.
Item numbers:
a570, i900, k173, h1444, q101
Link to post
Share on other sites
0 answers to this question
Recommended Posts