Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to call vbscript function with onsubmit.

Status
Not open for further replies.

Frank123

MIS
Sep 17, 2001
77
US
At the time I've got a login/password page that requires the user to tab down to the "login" button to submit. This login button calls the function btnLogin_onclick() which holds all the computing for the page.
What I want to accomplish is when the user is done typing in the login and password, they can just hit the enter key and it calls the btnLogin_onclick() function.
My button in the body looks like this:

<!--#INCLUDE file=&quot;_ScriptLibrary/Button.ASP&quot;-->
<script language=&quot;JavaScript&quot; runat=Server>
function _initbtnLogin(){
btnLogin.value = ' Log In ';
btnLogin.setStyle(0);
}
function _btnLogin_ctor(){
CreateButton('btnLogin', _initbtnLogin, null);
}
</script>
<% btnLogin.display %>
I'd really appreciate any advice. Thank You!
 
If you hard code your button on your page you can just do this: <input type=&quot;submit&quot; onclick=&quot;yourFunction()&quot;> or in your form tag put onSubmit=&quot;yourFunction()&quot;

J
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top