469,282 Members | 1,949 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,282 developers. It's quick & easy.

Posting data back to a modal dialog window

Hi all,

I have a modal dialog window from which a user selects a few rows from a
datagrid and then clicks on an image button. My question is two-fold:

1. How do I post data back to the same dialog window?

2. The dialog window in question was, in turn, created from a dialog window.
I need to post data back to that one too (that which the user selected in
the top-most dialog window). How do I send data back to this window?

Regards
John.
Nov 17 '05 #1
2 6895
Hi John,
Posting back in a modal dialog box has not worked for me in the past.

I woud like to see if it works for you?

Cheers,
Angus

"John" <a@b.com> wrote in message
news:OK*************@TK2MSFTNGP12.phx.gbl...
Hi all,

I have a modal dialog window from which a user selects a few rows from a
datagrid and then clicks on an image button. My question is two-fold:

1. How do I post data back to the same dialog window?

2. The dialog window in question was, in turn, created from a dialog window. I need to post data back to that one too (that which the user selected in
the top-most dialog window). How do I send data back to this window?

Regards
John.

Nov 17 '05 #2
Hi

2 ways to post to a dialog

1 Place a iframe/frameset in the dialog and host the page there
2 <base target="_self">

Returning value to the opener:
( Iframe )
parent.window.returnValue = theValue;
parent.window.close();

( Frameset )
top.returnValue = theValue;
top.close();

(<base target="_self"> )
window.returnValue = theValue;
window.close();

Getting value in the opener
var res = showModalDialog(........);
if(typeof(res) != "undefined") alert(res);

If returning more than 1 value you can use comma delimited.....

More info
http://msdn.microsoft.com/library/de...ence_entry.asp
http://msdn.microsoft.com/library/de...oriJScript.asp

--
Best Regards
Vidar Petursson
==============================
Microsoft Internet Client & Controls MVP
==============================
"John" <a@b.com> wrote in message
news:OK*************@TK2MSFTNGP12.phx.gbl...
Hi all,

I have a modal dialog window from which a user selects a few rows from a
datagrid and then clicks on an image button. My question is two-fold:

1. How do I post data back to the same dialog window?

2. The dialog window in question was, in turn, created from a dialog window. I need to post data back to that one too (that which the user selected in
the top-most dialog window). How do I send data back to this window?

Regards
John.

Nov 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Matt | last post: by
2 posts views Thread by Ricky K. Rasmussen | last post: by
8 posts views Thread by Craig G | last post: by
2 posts views Thread by sthrudel | last post: by
4 posts views Thread by abb | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.