/    Sign up×
Community /Pin to ProfileBookmark

windowname.focus from flash document

My problem to solve is angled towards tabbed browsing.

I’ve kept this problem on the “oh, I’ll be able to figure this one out myself” list for weeks but am failing miserably ? .

Basically, my flash document opens a popup window. That popup window is brought on by the following externally loaded javascript .js file:

[CODE]var webcast = “null”;
var help = “null”;
var sonic = “null”;
var gallery = “null”;

function PopUp(url, name, width, height)
{
var attrs = ‘width=’ + width + ‘, height=’ + height + ‘, top=0, left=0, location=0, toolbar=0, scrollbars=0, status=0, menubar=0, resizable=0’;
if (name == “webcast”) webcast = window.open(url, name, attrs);
else if (name == “help”) help = window.open(url, name, attrs);
else if (name == “sonic”) sonic = window.open(url, name, attrs);
else if (name == “gallery”) gallery = window.open(url, name, attrs);
else return false;
return true;
}[/CODE]

Now, the opened window (let’s assume it’s called “help”) is brought to the front by most browser as a default. Tabbed browsers are another story.

When I run the PopUp function from an html page (using onClick), tabbed browsers open the tab window in front and display everything as I intend (yay).

From the flash document, however, the tabs are opened behind.

I’ve tried help.focus(); in the flash doc and self.focus(); inside the opened window but to no avail.

Is there any alteration to my .js code which might remedy the problem?

Other solutions?

NS7 is my primary target to rid of this problem.

to post a comment
JavaScript

1 Comments(s)

×

Success!

Help @robindean spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...