Set focus to a button
Hi everyone,
I have been searching for a while without success so would like to ask if anyone can help me here.
I have a login page with jusy username and password text fields and a login button.
I would liek users to be able to hit the enter key to activate the login process.
My code currently is
<cfformgroup type="panel" label="Development Area" height="130" style="cornerRadius: 0;">
<cfinput type="text" name="username" width="150" label="Username">
<cfinput type="password" name="password" width="150" label="Password">
<cfformgroup type="horizontal">
<cfinput type="submit" name="login_user" height="22" width="150" value="Log In" style="#buttonStyle#">
</cfformgroup>
</cfformgroup>
</cfformgroup>
This works fine but only if the user uses the mouse to click the login button.
I think it is maybe something to do with "if key is 13 then do sonmething" but I can't seem to get the code right
Anyideas please??
Thanks in advance