webstudiointeractive
asked on
Javascript Popup controlling parent window focus problem in FireFox
Hi guys,
I have the following development page with a link to "Launch Calculator".
As I cannot change the search results page, I'm building a Javascript popup window with a calculator to control the search results.
I need the calculator to be in focus at all times. It is designed so that when you change a value in the Calculator - the search results are refreshed.
The development link is http://centenary.thermosis.com/v2/calculator.flash.html
It is working perfectly in Internet Explorer, but not in Firefox. Firefox initially loads the first search result pefectly, and the Calculator stays in focus. But the 2nd change to the Calculator opens a new browser window to show the results, and the new window takes focus. If I then give focus to the calculator manually - it works from there on.
How can I make it work the same as Internet Explorer and Safari?
The various code snippets are shown below.
First page's javascript link:
Popup's body code:
Flash ActionScript 2 code to refresh the main window:
I have the following development page with a link to "Launch Calculator".
As I cannot change the search results page, I'm building a Javascript popup window with a calculator to control the search results.
I need the calculator to be in focus at all times. It is designed so that when you change a value in the Calculator - the search results are refreshed.
The development link is http://centenary.thermosis.com/v2/calculator.flash.html
It is working perfectly in Internet Explorer, but not in Firefox. Firefox initially loads the first search result pefectly, and the Calculator stays in focus. But the 2nd change to the Calculator opens a new browser window to show the results, and the new window takes focus. If I then give focus to the calculator manually - it works from there on.
How can I make it work the same as Internet Explorer and Safari?
The various code snippets are shown below.
First page's javascript link:
<a href="#calculator" onClick="javascript: window.name = 'main'; window.open('calculator.html','mycalc','width=300,height=410'); return false;">Launch Calculator</a>
Popup's body code:
<body onblur="window.focus();">
Flash ActionScript 2 code to refresh the main window:
getURL(theURL, "main");
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.