Setting a button in a Jquery dialog as the default.
I have a an asp.NET application that has a login page on it with a Jquery dialog box on it. In the dialog are fields for a user name and passwords, a login button and a cancel button. The Javascript that defines the dialog box is below. After the user enters their user name and password I'd like them to be be able to hit the enter key and have the function attached to the login button run. In other words at that point I'd like the login button be the default. Any suggestions would be greatly appreciated.
Thanks for your response. That sets the focus when the dialog is first opened but after the user enters there user name and password the focus is on the last field in which an entry was made. Do you know how I can make the Login button the default button?
ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.
One of a set of tools we're offering as a way to say thank you for being a part of the community.
The order of the buttons doesn't make a difference as neither one is acting as the default. When the user hits the enter key nothing happens.
I don't know if makes a difference but there are 3 asp buttons on the master page the login page is based on. They aren't available until the dialog is closed. Below is the html for the master and login pages.
Thanks for the new suggestion but I'm afraid it didn't work either. After entering the user name and password hitting the enter key still has no affect.
0
leskellyAuthor Commented:
I found the following solution. Adding this code in my OpenLoginDialog function below where the dialog box is created did the trick.
Open in new window