Solved

Javascript Popup controlling parent window focus problem in FireFox

Posted on 2011-03-03
2
1,274 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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Suggested Solutions

I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

726 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