Newbie: Javascript help

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

What js code is required to automatically submit a page to the server when a
user enters a given character (say "?") into a textbox server control please?

Thank you
 
In the .aspx page (did not check it running):

<head>
....
function checkKey(){
if (window.event.keyCode==63)
myForm.submit();
else
return true;
}
....
</head>
<body>
<form id=myForm ...?>
....
<asp:textbox ... onkeypress="return checkKey();" ... />
....
</form></body>

Eliyahu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top