View Full Version : Modal window question

10-08-2003, 05:09 PM
Hi all,

I am facing a typical problem. I open a modal dialog,
incidentally an jsp page. Like this in javascript


Now when I try to click a button on this page it opens up
in another page. But I want it to open in the same modal

Please provide suggestions on this.


10-09-2003, 08:59 AM

10-09-2003, 05:45 PM

I tried your siggestion.
It doesnt work.

I have a page, page a from which I open the modal window. Then from the modal window I click the button to get some results.

Please help

10-09-2003, 08:32 PM
...so you want to reload the modalwindow with the results?

I'm not sure you can do that. One solution is to put an iframe that covers the whole dialog and then reload only the iframe.

10-09-2003, 08:46 PM
From so many posts I see put an iframe.

I am not sure of how to do that.

Can any one please give me an example

Where shd I put the iframe ?

this is my sequence :
From 1 jsp, I open the modal window. From the modal window, I want to submit the form and get the results.

10-09-2003, 09:08 PM
Create a new page in which you put the form.

In the modalwindow page, you put this:

<body style="margin:0px;">
<iframe src="form.jsp" width="100%" style="height:300px;"></iframe>
| Modal window X |
+----------------------+ -
|+--------------------+| |
|| Iframe that || |
|| covers the ||
|| whole window. || 300 px
|| ||
|| || |
|| || |
|+--------------------+| |
+----------------------+ -

|------ 100 % ---------|

where 300px is the height of the modal window.

You put the rest of the html inside form.jsp. When the user then submits the form, the new page will be loaded in the iframe.