How to set the focus to a child window without refreshing it?
Now when click on a link, it opens a popup window, which contain a data entry
form, I entered some information into that form. Then I need to review other
information, from other popup window, so I go back to the main window, click on
another link, a new popup window get open which contain the information I need
to review. I get the information and close this popup window, so now I am on the
main window, then again I click on the link for that data entry form, so the
popup window comes up but I lost the information that I have entered, that's
because I am relodiing the popup window once again.
Let us see how it works,
- When attempt to open the window again with the same name in the second parameter of the windows open method, you will to get the windows handle. If the window is already open, it will return the handle of the opened window or it will open a new window and return it's handle
- The first parameter (the url) is passed as an empty string, so the page will not get redirected which will result in the contents of the window remaining unchanged.
Note : You cannot get the handle if the
page is not on the same host as its opener
Comments
Post a Comment