G
Grant Merwitz
Hi
I am trying to get the enter key to submit my login form
The login form is currently in a control on the page and uses an
asp:imagebutton as it's login button.
If a user presses enter currently, the page just reloads.
I have tried to use some javascript to set the enter key on the button, but
this script only seems to work for an asp:button and not the
asp:imagebutton.
Any help on how to do this would be greatly appreciated.
The javascript i am using currently is: (attached to the password textbox)
onkeydown="if (event.keyCode && event.keyCode == 13)
{document.Form1.elements['Header1:AuthControl_Main1:AuthControl_Login:imgLogIn'].click();return
false;} else return true; "
- This still refreshes the page when enter is click i.e. its not working
When i place a asp:button on the page that calls the same method as the
asp:imagebutton, this works fine
onkeydown="if (event.keyCode && event.keyCode == 13)
{document.Form1.elements['Header1:AuthControl_Main1:AuthControl_Login:Button1'].click();return
false;} else return true; "
HELP!!
TIA
Grant
I am trying to get the enter key to submit my login form
The login form is currently in a control on the page and uses an
asp:imagebutton as it's login button.
If a user presses enter currently, the page just reloads.
I have tried to use some javascript to set the enter key on the button, but
this script only seems to work for an asp:button and not the
asp:imagebutton.
Any help on how to do this would be greatly appreciated.
The javascript i am using currently is: (attached to the password textbox)
onkeydown="if (event.keyCode && event.keyCode == 13)
{document.Form1.elements['Header1:AuthControl_Main1:AuthControl_Login:imgLogIn'].click();return
false;} else return true; "
- This still refreshes the page when enter is click i.e. its not working
When i place a asp:button on the page that calls the same method as the
asp:imagebutton, this works fine
onkeydown="if (event.keyCode && event.keyCode == 13)
{document.Form1.elements['Header1:AuthControl_Main1:AuthControl_Login:Button1'].click();return
false;} else return true; "
HELP!!
TIA
Grant