please anybody help to solve keydown event for enter button problem

Reply

Join Date: Dec 2006
Posts: 12
Reputation: Rocksoft is an unknown quantity at this point 
Solved Threads: 0
Rocksoft Rocksoft is offline Offline
Newbie Poster

please anybody help to solve keydown event for enter button problem

 
0
  #1
Mar 8th, 2007
Hi,

I am working in asp.net with C# web application, i have used one textbox and image button for search
funtion, i have created one user control for this, but after i have entered value in textbox, i have pressed the
button, its not at all working, if i will use mouse i can able to search values, how to enable to enter key at
keydown event of textbox, the following script i have used ,

function Buttonfocus()
{
if(event.which || event.keyCode)
{
if ((event.which == 13) || (event.keyCode == 13) || (event.which == 10) || (event.keyCode == 10))
{
document.getElementById("go").click();
return false;
}
}
else
{
return true;
}
}


Please anybody to help me solve this problem in my application, advanced thanks for any reply.
Thanks.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC