suttercain Posted November 18, 2008 Share Posted November 18, 2008 Hi everyone, I am trying to make an AJAX call after the user enters a value into an input box and clicks submit. The call is made but the value comes back as "UNDEFINED". Javascript: <script type="text/javascript"> function showEngine(str) { $('#south').html('Loading data, please wait...').load("select3.php?q="+str); } </script> HTML FORM: <form name="form" method="get" action=""> <input type="text" name="q" /><br /> <input type="button" onClick="showEngine(this.str)" name="submit" value="submit"/> </form> I tried the onSubmit in the form tag, but that reloads the page and I still get the undefined. Any advice? Thanks. Link to comment https://forums.phpfreaks.com/topic/133212-using-jquery-to-make-an-ajax-call-via-a-form-value-how-to/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.