[ 3 posts ]

MJ87

  • Username: mj87
  • Joined: Tue Sep 20, 2011 9:43 am
  • Posts: 2
  • Offline
  • Profile

How do i automatically set focus on a text field?

Post Posted: Tue Sep 20, 2011 9:49 am
+0-
I have a text feild on my site which i want to automatically focus... but I am having no joy implementing this... does anyone ahve a suggestion?

John Lindal

YUI Contributor

  • Username: jafl
  • Joined: Mon Nov 02, 2009 2:33 pm
  • Posts: 351
  • Location: Los Angeles, CA
  • Twitter: jafl5272
  • GitHub: jafl
  • Gists: jafl
  • Offline
  • Profile

Re: How do i automatically set focus on a text field?

Post Posted: Mon Sep 26, 2011 10:21 am
+0-
If you have a Y.Node instance, you should be able to just call node.focus();

mohammadsullivan

Tags:

Re: How do i automatically set focus on a text field?

Post Posted: Mon Sep 26, 2011 9:13 pm
+0-
Hey John,

I have tried what you suggested and it works really well. Thanks for the tip. It really save a lot of time on my part trying to figure things out.
  [ 3 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum