Jump to content
  • Advertisement
Sign in to follow this  
sooner123

AJAX login won't process ENTER same as clicking Submit

This topic is 3170 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

http://www.roseindia.net/ajax/ajaxlogin/ajax-login-program.shtml Here is the example. And here you can test it out: http://www.roseindia.net/ajax/ajaxlogin/ajaxlogin-example.html Notice how when you enter admin / admin and click the Login button, it processes the information correctly, but when you press enter while the focus is still in the Password field it doesn't. This is strange since as you can see in the first link, he put an onsubmit attribute in the form tag presumably to handle this type of situation. How do I fix this?

Share this post


Link to post
Share on other sites
Advertisement
change:
<input type="button" name="a1"  value="Login" onclick="call_login()">


to
<input type="submit" name="a1"  value="Login" onclick="call_login()">

Share this post


Link to post
Share on other sites
Are you using ASP.net by any chance. if so, i am assuming this is in Internet Explorer then.

If this is your case, have a read at this article.

http://www.4guysfromrolla.com/articles/060805-1.aspx

It's a bug in the IE system, firefox handles it properly. I have run into this a few times, and now i feel like i need to spread the word lol.

If this is not your case, sorry.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!