Solved

Javascript Popup controlling parent window focus problem in FireFox

Posted on 2011-03-03
2
1,265 Views
Last Modified: 2012-05-11
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:
<a href="#calculator" onClick="javascript: window.name = 'main'; window.open('calculator.html','mycalc','width=300,height=410'); return false;">Launch Calculator</a>

Open in new window


Popup's body code:
<body onblur="window.focus();">

Open in new window


Flash ActionScript 2 code to refresh the main window:
 
getURL(theURL, "main");

Open in new window

0
Comment
Question by:webstudiointeractive
2 Comments
 
LVL 17

Accepted Solution

by:
GreatGerm earned 500 total points
ID: 35038939
It looks like the pop-up isn't able to connect to the named window for some reason.  Try changing your call to something like getURL("javascript:window.opener.location = '" + theURL + "'; void(0);");
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question