/    Sign up×
Community /Pin to ProfileBookmark

window.open in showModalDialog

How can i open a new window from within a dialog box?
(yes i know it only works in IE.. IE is the only thing i need it to work in..)
window.open does not appear to work, and i’d rather not load it in the parent frame (which is a webband)

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@CrazyMerlinJan 17.2006 — 'from within a dialog box'??

what do you mean?

you can open a window with a dialog style, but you cannot make it modal.

well, you could try to set it's focus when the onblur event is called.

you could also design a css-driven div that looks just like a real modal dialog, and have it pop up in the same window. that would be cool and would give you full functionality as you are not leaving the page.

you could set its background-image so that it looks like a modal dialog, and believe me they would be fooled into thinking it was. In your div, you could have two tables so that the pseudo titlebar of the dialog flashes when they try and focus away from it.
Copy linkTweet thisAlerts:
@johneboyauthorJan 17.2006 — 
'from within a dialog box'??

what do you mean?
[/QUOTE]


yes. in the html code of the page that opens as a dialog box, using
window.open("http://url");
does not work



you can open a window with a dialog style, but you cannot make it modal.
[/QUOTE]

If at all possible, i'd prefer not to use a standard IE window.


you could also design a css-driven div that looks just like a real modal dialog, and have it pop up in the same window. that would be cool and would give you full functionality as you are not leaving the page.

you could set its background-image so that it looks like a modal dialog, and believe me they would be fooled into thinking it was. In your div, you could have two tables so that the pseudo titlebar of the dialog flashes when they try and focus away from it.[/QUOTE]


unfortunately, CSS will not work here, as i am calling the window from a webband, so if i use CSS, as fas as im aware, i cannot place div outside the bounds of that webband.



Appreciate the input tho!
Copy linkTweet thisAlerts:
@johneboyauthorJan 18.2006 — yes. in the html code of the page that opens as a dialog box, using
window.open("http://url");
does not work

[/quote]


:mad: stupid popup blocker was blocking it!

? now to find a way around that....
Copy linkTweet thisAlerts:
@CrazyMerlinJan 18.2006 — yes, now you really do have a problem.

if it is being blocked by your popup blocker, think how many more will block it in the real world.

you could change the contents of your webband to accept input and micro-scale your page into your webband with only essential elements and not too much text
×

Success!

Help @johneboy 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.18,
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,
)...