Pressing enter inside a textbox refreshes the whole page in Google Chrome.
please help me out
views:
113answers:
1
+3
A:
Pressing Enter in an input field submits a form which, depending on your form's action attribute, may well be submitting the form to the same page (causing it to appear like a refresh). This is intended behaviour. If you're talking about a text-area, then that's an entirely different matter (and is probably relating to some custom JavaScript event).
If this isn't what you mean, you're going to need to clarify your question. At the very least, please post the excerpt of HTML that encompasses your <form> tags.
James Burgess
2010-04-21 22:51:39
Pressing enter in a textarea shouldn't submit the form, but create a newline char.
MatW
2010-04-21 22:54:30
Sorry, my mistake, I've clarified. Thanks for pointing it out.
James Burgess
2010-04-21 22:57:06
+1 for the edits. It isn't clear whether the OP means a text input or area.
MatW
2010-04-21 22:59:50
<form id="aspnetForm" action="ApplicationMarketPlace.aspx?id=6fa83b63-274c-4ad4-88de-61ae261a9e28" method="post" name="aspnetForm">
praveen
2010-04-21 23:19:45
this is what my form tag contains thanks james
praveen
2010-04-21 23:20:03
Thanks for the info, but a little bit more would be helpful (sorry)! Could you edit your original question with the entirety of the form, any JavaScript affecting the form itself. That way, we can see what the form does completely (i.e. see if it's a text-area or an input field) and also be able to test it out to see if the problem can be reproduced! Thanks!
James Burgess
2010-04-21 23:24:16
its not like javascript i have asp.net form inside that i have asp textbox clicking inside the textbox refreshes the whole page this happens only in chrome
praveen
2010-04-21 23:29:37
text box has onkeydown event
praveen
2010-04-21 23:29:55
Right, okay - what does the onKeyDown event actually do? (And, again, is it an input-box [i.e. single-line] or a text-area [i.e. multi-line]). It would be very helpful if you could give some more complete information, it's very difficult to help solve a puzzle without all of the pieces :)
James Burgess
2010-04-22 07:41:12