Solved

Javascript Popup controlling parent window focus problem in FireFox

Posted on 2011-03-03
2
1,278 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

Question has a verified solution.

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

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
This article discusses how to implement server side field validation and display customized error messages to the client.
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

729 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