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. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Please post some code. On Jun 20, 11:46 am, MindGamez <hiteshr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
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 On Jun 20, 12:20 pm, Diodeus <diod...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Please post some code. > > On Jun 20, 11:46 am, MindGamez <hiteshr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > 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.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---