/    Sign up×
Community /Pin to ProfileBookmark

Modal dialog contents

I’m displaying a dialog with the command showModalDialog, but when you follow a link inside it, I want the dialog to update to display the target, whereas it opens in a new window…

I’ve tried using onclick to instigate the window.navigate method, but all to no avail. I can’t even find out how retrieve the modal dialog’s name!

I’m using IE (6)

Any ideas? Come on Dave!

to post a comment
JavaScript

10 Comments(s)

Copy linkTweet thisAlerts:
@GeatauthorApr 30.2003 — window.showModalDialog('movepage.php?move_id=4, window, 'dialogHeight: 240px; dialogWidth: 320px;help: no; unadorned: yes; status:no; centered:yes');

There are links in the php script allowing the user to manipulate stuff, and the script loads itself from these. However, these don't load in the modal as I'd expect, but in a brand new browser window...
Copy linkTweet thisAlerts:
@khakiApr 30.2003 — hi Geat...

i think that you need to explain what you mean by "manipulate stuff".

i use (cross-browser) ModalDialogs, and I have nested ASP pages in them using <iframe>s.

that could be considered "manipulating" i suppose....

but what exactly are you trying to use the ModalDialog for?

If you expalin the purpose...

then maybe i can understand.

?

? k
Copy linkTweet thisAlerts:
@GeatauthorApr 30.2003 — Was a little vague I guess!

Basically, this script allows the site administrator to move a page of their website to a different location. They are given a collapsed view of all of the pages, and they can reveal children by clicking on a page name.

When they have found the page they wish to move the selected page to, they can click submit to finalise the move.

The problem is, when the user clicks on a link to display it's children, the PHP script reloads itself with the "clicked-on" page as the pivot. However, the script reloads in a new, non-modal window, not the initial modal dialog. Why?

Thanks! ?
Copy linkTweet thisAlerts:
@khakiApr 30.2003 — However, the script reloads in a new, non-modal window, not the initial modal dialog. Why?[/QUOTE] ummm...

...don't know :rolleyes:

BUT...

that is why i use nested files using Includes and especially <iframe>s...

since you can manipulate either the host file OR the nested file(s) and remain within the content of the ModalDialog.

it may require a slight shift in conceptual thinking and planning (and maybe some changes to your existing pages/code :eek: ) but the idea behind these boxes is to retain control (since it maintains focus while open) AND to provide what standard DialogBoxes and Pop-ups cannot. The key however, is to keep all of the activity (manipulation) "inside" of the ModalDialog.

(<iframe>s accomplishes that)

does that initiate a new approach...

or are your specific needs not addressed with that type of solution?

('cause that's all i got! I'm tapped-out! LOL)

? k
Copy linkTweet thisAlerts:
@GeatauthorApr 30.2003 — Sounds like it's kinda over-complicating the issue! I can appreciate the need for that approach in some areas (indeed, I do use it for my plug-in module viewer), but for this I think I'll stick to the good ol' standard pop-up window! :rolleyes:

Cheers Khaki!
Copy linkTweet thisAlerts:
@khakiApr 30.2003 — Sounds like it's kinda over-complicating the issue![/QUOTE] I don't see how.

It actually [I]simplifies[/I] the issue (since your fall-back plan is to use pop-ups instead :rolleyes: ).

(and in that case... why did you feel it necessary to use ModalDialogs in the first place?)

I just don't get it...

A file within a file will remain within the file.

I don't see how that is complicated at all.

i think that you caved too soon on this.

but... if pop-ups provide the solution for you...

go for it (but you DID ask for a ModalDialog solution :rolleyes: ).

? k
Copy linkTweet thisAlerts:
@khakiApr 30.2003 — ok Geat...

i ran a little test:

http://forums.webdeveloper.com/showthread.php?s=&threadid=8778

and the culprit is: [B]IE6![/B]

i guess that Microsoft had some spare parts left over when they got done building version 6... and they weren't sure where they all belonged... so they just tossed 'em.

unfortunately they tossed a boat-load of ModalDialog functionality along with the rest of it.

idjuts!!!

bottom-line.

ModalDialogs have just become nothing more than customized dialog boxes.

:rolleyes: k
Copy linkTweet thisAlerts:
@GeatauthorMay 01.2003 — Thanks for that Khaki!

Bloody Microsoft incontinuity...

Pop-up it is then!
Copy linkTweet thisAlerts:
@DrDaMourMay 01.2003 — Khaki: what is a modal dialogue, or give me a link to some documentation please i went googling but since i've never heard the term i'm coming up empty handed.
Copy linkTweet thisAlerts:
@khakiMay 01.2003 —  Khaki: what is a modal dialogue, or give me a link to some documentation please[/QUOTE]
good morning doc...

here is the msoft link for the method:

http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/showmodaldialog.asp

...and here is the link to the page that i set up for the browser verion test :

http://www.1dot0.com/khaki/modalDialog.htm

(pay no attention to the "drag". the host server seems to get slower by the minute :rolleyes: )

by the way...

this is still a great method... (especially if your users will NOT be using IE6).

and it would STILL be a good method... as long as you don't need much internal functionality within the dialog itself.

and just to summarize:

it behaves just like a pop-up...

except it retains focus (like a dialog box)...

so the user must interact with it (and/or dismiss it) in order to return to the page that called it.

it's still an excellent way for creating custom dialog boxes (although Netscape and Mozilla need page refreshes to re-call the same dialog box once it's been called the first time. although there are work-arounds for that... so...)

blah...blah...blah...

that was a lot of words for 0800.

(yawn...)

a still sleepy...

? k
×

Success!

Help @Geat 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.2,
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: @meenaratha,
tipped: article
amount: 1000 SATS,

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

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