/    Sign up×
Community /Pin to ProfileBookmark

JavaScript Anomaly in Firefox 2?

Fair warning — I know little enough about javascript (as will soon become apparent).

I’ve been using a small piece of javascript code in a website I’m rebuilding. The code’s purpose is to pop up a small reference window that can pull from various html “anchors” in various files. It puts the focus on the newer, smaller window. If the user continues reading/scrolling through the main window, the focus disappears until the user does a mouseover on the next link, whereupon the original popup receives the focus and offers the new information.

The script works correctly in IE6, IE7, Opera 9.1. The glitch comes with Firefox 2.0. The first time a mouseover is done in Firefox, the window appears properly, and as long as the user mouses over the links (without returning focus to the main window) everything works fine. However, if the main window gets the focus, the smaller popup information window (while properly tracking the data) never reappears unless brought to the fore by the user manually.

The code looks like this:

<a href=”javascript: void(0)” onmouseover=”Features=window.open(‘filename.htm#databookmark’,’Features’,’scrollbars=yes,resizable=yes,width=200,height=350,screenX=50,screenY=250,left=50,top=250′); Features.focus()” >Desired Information Link.</a>

Obviously, either I’m missing something, or Firefox just handles this code differently from IE and Opera. Any suggestions or insights would be greatly appreciated.

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@A1ien51Feb 06.2007 — It would be a pop up blocker

Eric
Copy linkTweet thisAlerts:
@TravLee2authorFeb 06.2007 — Ah, I should have addressed the pop-up blocker possibility in my initial posting. Sorry.

Yes, "Block pop-up windows" is set to ON (i.e., the option box is checked); however, the site in question is specifically excepted in Firefox's Exceptions list.

Besides, assuming that the site was not specifically excepted, wouldn't a pop-up blocker have kept the initial instance of the pop-up from occurring as well?

As somebody who knows JavaScript (a fair assumption, since you're on the forum), does the code look correct as it stands?
×

Success!

Help @TravLee2 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 5.26,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

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

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...