This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to bring window in focus that is already open

 
Kaustubh Hande
Greenhorn
Posts: 18
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic