Using ModalDialog behavior in firefox

R

Rabia

I am using the window.open() with modal=yes to simulate the pop up
window as modalDialog in mozilla/firefox.

The pop-up window (child) has a few options which the user selects and
then click the submit button. What i need to do on this submit button
click is to return the value from the child to the parent window, close
the child window and reload the parent page to reflect the changes as
selected in the child window.

Can anybody provide me with a solution to do this?

Thanks.
 
E

Erwin Moller

Rabia said:
I am using the window.open() with modal=yes to simulate the pop up
window as modalDialog in mozilla/firefox.

The pop-up window (child) has a few options which the user selects and
then click the submit button. What i need to do on this submit button
click is to return the value from the child to the parent window, close
the child window and reload the parent page to reflect the changes as
selected in the child window.

Can anybody provide me with a solution to do this?

Thanks.

Hi Rabia,

A few pointers:
- use from childwindow window.opener to get a reference to the parentwindow.
- make a function (or functions) that receive the values put in the
childwindow.
- call a function in parentwindow that will force it to refresh.
- after sending the info to parentwindow, call self.close() to close the
childwindow.

Hope that helps.

Regards,
Erwin Moller
 
R

Rabia

Thanks..

i was doing all that. However, i needed to submit the parent window's
from( window.opener.document.formname.submit() ) rather then reloading
it which solved the problem
 
B

bevs

Hi Rabia.

I also need to return a value to the parent window from a child window
in Firefox.
Could you provide your code here?

Thanks
Jakob

Rabia skrev:
 
R

Rabia

There are ways in which you can return the value from a parent a child
in firefox.

1) Suppose you have a hidden field in your parent window. Then you can
use the following in the child window

window.opener.document.formname.hiddenfield.value = returrnValue;

and then make changes accordinglyi n the parent depending on the return
value.
You can also call a function defined in the parent in this way.

2) If you need to submit the form then you can use querystring as well
by setting
parent window url as

window.parent.opener.location= 'some_url_with_querystring';

Hope this helps.

Rabia
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,144
Latest member
KetoBaseReviews
Top