give regular button same interface as a submit button
5:39 am on Feb 20, 2006 (gmt 0)
hey I created a form that submits data with ajax the problem is that I want the user to be able to send this data when they hit enter not just when they click on the button how can I get this effect.
5:49 am on Feb 20, 2006 (gmt 0)
What is the code for the button? <input type="button">?
Can it be changed to a submit button?
5:54 am on Feb 20, 2006 (gmt 0)
Hi, I had a similar problem where a form had a js "onClick" submit button and I needed pressing enter submit as well. The only work around that worked was that I put a submit input in the form that I hid by using div at absolute negative pixels. I don't know anything about Ajax, but it might work. Keep in mind that negative div might trigger a hidden text red flag with SEs. The page I did this on still has PR and is cached By SEs.
7:07 am on Feb 20, 2006 (gmt 0)
I would recommend replacing the <input type="button"> with <input type="submit"> and then use the form's
2:32 pm on Feb 20, 2006 (gmt 0)
Thanks that just returning false was the type of thing I was looking for. Now it acts like a submit button without actually submitting the form.