This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

How to set focus for input box after using visual_effect?

Forum to discuss ExtJS and other JS plugins

How to set focus for input box after using visual_effect?

by IOOI » Wed Nov 05, 2008 8:14 am

I ran out of my way to set focus to an input box after using visual_effect, like:

<?php echo link_to_function('Login', visual_effect('appear', 'login_form', array('duration' => 0.3))); ?>


and there is an "nickname" input box in login_form. How can I set focus on it?

I've tried body on_load but it doesn't work after clicking.

Thanks!
IOOI
Junior Member
 
Posts: 14
Joined: Fri Jul 28, 2006 12:55 pm
Location: Beijing

Re: How to set focus for input box after using visual_effect?

by joshcoady » Thu Dec 18, 2008 7:03 pm

i do this after the form:

Code: Select all
<?php echo javascript_tag('$("title").focus();') ?>
joshcoady
Member
 
Posts: 52
Joined: Mon Jun 30, 2008 7:00 am
Location: Rohnert Park, CA