/    Sign up×
Community /Pin to ProfileBookmark

showModelessDialog AND "modal" attribute

I have been struggling with this for a few days now and was hoping somebody had some advice. I have my webpage up now, and the problem I am having is that I have a javascript that opens a new window. This all works fine, but the problem I am running into is that when the user clicks on the thumnail, the new window opens (this works fine) but when the user clicks on another thumbnail, the window goes behind the main window. This causes the user to get lost in the site, not knowing where the new gallery window is located. So I am trying to figure out how to keep the new window on top of the main window.

Here is an example:
[url]http://www.pridenutrition.com/ArnoldClassic2005.aspx[/url]

So what I have figured out is how to make this method work in IE. Using the showModelessDialog method.

Here is an example:
[url]http://www.pridenutrition.com/TESTshowModelessDialog.html[/url]
(if you click the “Click Here For Nutritional Information” link, open the window, and then click back to the main window, the showModelessDialog works by staying on top of the main window)
(This only works in Internet Explorer)

I have also gotton a separate way to work but it only works in Firefox. I used the attribute with a “onClick=”window.open()”, (at the end) ‘modal=yes’.

Here is that example:
[url]http://www.pridenutrition.com/TESTModal.html[/url]
(It works the same as above)
(but it only works in firefox, NOT IE)

So what I am struggling with is how to get it to work on both IE and Firfox???

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@felgallJul 26.2006 — Just give the window the focus after opening it so as to move it to the front.

onclick="w = window.open(); w.focus();"
Copy linkTweet thisAlerts:
@toohottieauthorJul 26.2006 — I have done that, but the problem is that it is a gallery in which I want to click "next" buttons and scroll through individual pictures... within that window that has "focus()
×

Success!

Help @toohottie 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.16,
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,
)...