aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes How to bring window in focus that is already open Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "How to bring window in focus that is already open" Watch "How to bring window in focus that is already open" New topic
Author

How to bring window in focus that is already open

Kaustubh Hande
Greenhorn

Joined: Apr 10, 2007
Posts: 18
Hello,
Im suppose to open a new window when user clicks a link "help". Now if the user clicks on the same link even though the previously opened window has not been closed, then I am suppose to bring the same window into view. I wrote the following code but it does not work.

var winHelp // Declared as global

winHelp=window.open( "./mam/pdf/Merchant Manager Reference Guide 5.0.pdf","winHelp","width=800,height=600,status=yes,titlebar=no,menubar=no,resizable=yes,left=0,top=0,scrollbars=yes");

winHelp.focus();

Please guide

Thanks
Kaustubh
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

I do it with a function that looks something like this:



NOTE: FireFox logs a bunch of XULExceptions when I use the 3rd argument.
It doesn't stop the page from working.
Finding out why and how to stop them is on my todo list.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to bring window in focus that is already open