KeyDown event is not firing second time.
Posted
by stackuser1
on Stack Overflow
See other posts from Stack Overflow
or by stackuser1
Published on 2010-06-07T06:36:13Z
Indexed on
2010/06/07
6:42 UTC
Read the original article
Hit count: 260
ASP.NET
|JavaScript
In my masterpage, i'm having one textbox for searching purpose. if we press enterkey it is redirecting to some otherpage. But it is happening only one time. next time when i enter some text and press enter key, it is not going to the Keydown event handler.
Code:
javascript Code: function SearchQuestionsAndDisplay(txt, event) { if (event.keyCode == 13) { document.location = "BrowserAddOn.aspx?SearchString=" + escape(txt.value); } return false; }
Text Box:
onkeyup = "return SearchQuestionsAndDisplay(this,event)" CssClass="searchtxtbox" />
Please suggest me what i need to do. pl let me know if there is anything missing in my code.
© Stack Overflow or respective owner