DISQUS

DISQUS Hello! Building Browsergames is using DISQUS, a powerful comment system, to manage its comments. Learn more.

Community Page

Jump to original thread »
Author

Making your forms auto-focus

Started by Luke · 8 months ago

One of the small, hard to notice features that I’ve encountered on a few games and grown to love is that of the auto-focusing form field. When you go to login or register, as long as your web browser has Javascript enabled, you’ll automatically be able to type into the ... Continue reading »

4 comments

  • I've written a form autofocus script that does this in a way that handles some of the problems that come up with the topic, and generally automatically figures out what field to focus on. Thought you might want to know. :)
  • It`s kinda confusing. You should put an example on the register.php or login.php
  • If you look at the register and login templates, you'll notice that they *
    both* have the code already implemented on them.
    If you are having trouble understanding how document.getElementById() works,
    you may want to learn a little bit more javascript before attempting to add
    it to your projects.
  • Ah, wonderful details! Thanks for adding this to the tutorial Luke!

Add New Comment

Returning? Login