showModalDialog

  • Thread starter Thread starter Curt_C [MVP]
  • Start date Start date
Shaul Feldman said:
Hello,
I'm trying to change the page in the modal window opened with
openModalDialog. The page change must be done from the modal window itself
WITHOUT postback. For now I have problems since it's not opening in the
modal window, but in a new window... I saw something about <base
target="_self">, but unfortunately it didn't work for me (IE6 SP1). Anyone
has ideas?

Use an iframe in the dialog to host the target page, then change the iframe src.

-Pete
 
Hello,
I'm trying to change the page in the modal window opened with
openModalDialog. The page change must be done from the modal window itself
WITHOUT postback. For now I have problems since it's not opening in the
modal window, but in a new window... I saw something about <base
target="_self">, but unfortunately it didn't work for me (IE6 SP1). Anyone
has ideas?
 
I've been reading MSDN information on Dialogue Boxes. I haven't found anything implying that server capabilities that would be accessible from a Dialog Box should be any different than what is accessible via window.open, or window.navigate. The term "modal" merely means that the window retains focus until it is closed and thus forces the user to compete their interaction with the Dialogue Box before doing anything else. It seems reasonable to expect that interaction between a web server and a Modal Dialogue Box would behave the same as between a web server and any other window; focus is controlled from within the browser

Even the simplest of Dialogue Boxes has to make a round trip to the server and render a page (albeit very simple HTML pages in the examples I've seen). In what way is this not "navigation", as you intend the term to mean?
 
What I meant was the next: If I load a page with a single link into modal
window, click the link, the result would be a new Window with the contents
of the page that link leads to. It's not what I need, I need to stay in that
modal window. I don't understand why can't I change pages in modal window,
I'm not trying to change the focus...

--
With the best wishes,
Shaul Feldman
Rich said:
I've been reading MSDN information on Dialogue Boxes. I haven't found
anything implying that server capabilities that would be accessible from a
Dialog Box should be any different than what is accessible via window.open,
or window.navigate. The term "modal" merely means that the window retains
focus until it is closed and thus forces the user to compete their
interaction with the Dialogue Box before doing anything else. It seems
reasonable to expect that interaction between a web server and a Modal
Dialogue Box would behave the same as between a web server and any other
window; focus is controlled from within the browser.
Even the simplest of Dialogue Boxes has to make a round trip to the server
and render a page (albeit very simple HTML pages in the examples I've seen).
In what way is this not "navigation", as you intend the term to mean?
 
Well, there;s a solution.
I thank everyone who tried to help me out with this problem.
The solution was quiet simple.
In the "head" section I had to name explicitely the window and
use it as a target in "href" link. Something like
<head>
<script>
window.name = 'winModal';
</script>
</head>
....
<a href="http://some.address" target="winModal">click here</a>
....

Worked great!

PS: Dear Curt, someone told me once - "there's nothing impossible, the
question is what are your limits"...

--
With the best wishes,
Shaul Feldman
 
Back
Top