Posted By:
Gary_Varga
Posted On:
Wednesday, February 26, 2003 03:26 AM
I have the following code in the page: function keypress(e) { if((document.layers ? e.which : window.event.keyCode)==13) { document.forms(0).User_ID_Button.click(); return true; } } if(document.layers)document.captureEvents(Event.KEYPRESS); if(document.layers||document.all)document.onkeypress = keypress; When I click the button with the mouse the server side handler for the click action (via a post) is run and the page is reloaded (it posts back to itself). However, when I press the carriage return key the server side handler is run but the page does not refresh with the generated html. It appears that I it does not lik
More>>
I have the following code in the page:
function keypress(e)
{
if((document.layers ? e.which : window.event.keyCode)==13)
{
document.forms(0).User_ID_Button.click();
return true;
}
}
if(document.layers)document.captureEvents(Event.KEYPRESS);
if(document.layers||document.all)document.onkeypress = keypress;
When I click the button with the mouse the server side handler for the click action (via a post) is run and the page is reloaded (it posts back to itself). However, when I press the carriage return key the server side handler is run but the page does not refresh with the generated html.
It appears that I it does not like the event within the handler. Is this it? Is there a solution? Am I a complete Muppet?
Thanks in advance,
Gaz
<<Less