sayedsohail Posted September 18, 2007 Share Posted September 18, 2007 Here is my code, i am not sure why this is not working? I am calling this script below inside a div using ajax and when i press enter inside the div nothing happens and no errors are displayed. < html> <head> <script> function entsub(evt) { var key = (evt) ? evt.which : event.keyCode; if (key == 10 || key == 13) { if (document.getElementById('search').value == '') window.close(); else searchwextended(); } } </script> </head> <body id='search' onKeyPress="entsub(event);"> <p> Search the Clients database:<br /> <INPUT type='text' size='30' id='search' name='search' autocomplete='off' > <INPUT type='button' value='Search' onClick="javascript:entsub(event);"></p> </body> </html> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.