crazyFoo
May 19th 2008, 2:15 pm
I'm working on an HTML form that uses AJAX to search a database and return results. Everything works just fine, except when someone hits 'Enter' instead of clicking my search button (which is NOT a true submit button, it is calling JavaScript onclick) the page reloads. This, of course completely kills the AJAX functionality.
Does anyone have any idea how to stop the page from reloading when 'Enter' is pressed? Better yet, does anyone know how to make the 'Enter' key call my JavaScript function?
Thanks in advance.
Does anyone have any idea how to stop the page from reloading when 'Enter' is pressed? Better yet, does anyone know how to make the 'Enter' key call my JavaScript function?
Thanks in advance.