I am using an image instead of a submit button for search option and use onclick events to load the results using ajax in php.Now I need to load results by hit enter also.Is their any ways to update my application without changing the image.
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Sure, add
<input type="submit" style="display:none;" />to the end of your form, should trick the browsers into allowing the Enter key to submit your form.As far as getting the same functionality as your AJAX
onclickevent: You should be tying your ajax function to the<form>‘ssubmitevent instead of the<input>‘sclickevent.jsfiddle demonstration (uses jQuery for ajax ease, but your event doesn’t have to)