I have a simple search box where the user is required to click the Submit button to send the address to some PHP/AJAX to query our SQL db. It does this by using the 'main-search' id of the Submit input.
<div class="address-search">
<input type='text' class='main-search-address' id="main-search-address" placeholder="Enter Street Address">in Seattle, WA
<input value="Search" type="submit" class="submit" id='main-search'>
</div>
I'd like to enable the user to be able to submit this form using the 'Enter' key, but when I wrap the inputs in a form tag, it submits, but no results show up. I've tried adding the id='main-search' to the form tag, which seems to get me closer, but instantly submits the form upon clicking in the text input.
Any help?
Thank you.
Aucun commentaire:
Enregistrer un commentaire