Forum: Rails Spinoffs (closed, excessive spam) Pop-up

Posted by MindGamez (Guest)
on 2008-06-20 17:47
(Received via mailing list)
I'm having an issue with setting focus on the pop-up after it comes
up.

For example, I log into a website and my login is incorrect a pop-up
box comes up and says incorrect password.  The pop-up box is on a z-
layer that does not allow you to click anything else until you click
on the okay button in the pop-up box.  I what to set focus on the Okay
button...but everything I have tired seems to be not working.

Any ideas?

The reason i want to do this is, so users can click press the enter
button rather then click on Okay button to remove the pop-up box.

Thank you in advance.
Posted by Diodeus (Guest)
on 2008-06-20 18:21
(Received via mailing list)
Please post some code.
Posted by Matt Foster (Guest)
on 2008-06-20 21:32
(Received via mailing list)
A convenient method for doing something like that is the
Form.focusFirstElement  -- 
http://www.prototypejs.org/api/form/focusFirstElement



--
Matt Foster
Ajax Engineer
Nth Penguin, LLC
http://www.nthpenguin.com
This topic is locked and can not be replied to.