By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,257 Members | 2,812 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,257 IT Pros & Developers. It's quick & easy.

Modal Windows Server side processing

P: n/a
When I open a modal window using 'showModalDialog' from an aspx page it works fine. But when I then perform a submit in my modal window to get data from the server, instead of the page returning to the modal window with the new data the server creates a new, non-modal, window - leaving the modal window in the state it was and another, unrelated copy open with the requested data in it

Can I get the data to return to the original modal window from the server without it opening a new (unwanted) window

This is for a search that is intended to return data back to the original parent window after searching is complete.
Nov 18 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Not sure if this will work, but could you set the target of your form to
be the original parent window this should result in the data being sent
straight back to the original parent window.

Matt

"CaptainZ" <an*******@discussions.microsoft.com> wrote in message
news:1F**********************************@microsof t.com...
When I open a modal window using 'showModalDialog' from an aspx page it works fine. But when I then perform a submit in my modal window to
get data from the server, instead of the page returning to the modal
window with the new data the server creates a new, non-modal, window -
leaving the modal window in the state it was and another, unrelated copy
open with the requested data in it.
Can I get the data to return to the original modal window from the server without it opening a new (unwanted) window?
This is for a search that is intended to return data back to the

original parent window after searching is complete.
Nov 18 '05 #2

P: n/a
Thingis that I want to be able to perform various actions on the modal window that relate to a SQL database, and when I am finished then return to the parent.

I can't make it return to the modal window after going to the server after user input - which is the problem I would really like to get around - and I can't work out any way to save user entered parameters without doing a server side trip and ending up on a newly created, non-modal, window.

Trouble is - how do I go to another web page, provide user interaction including server side work, and return values to the parent page whilst not losing the parent's state and keeping the child page modal? The parent is not (typical) simple and includes multipage datagrids and numerous dropdownlists - so saving the state manually and reconstructing it is not trivial - hence the desire to go modal and return to an unchanged parent page

But cannot figure out how. Modal - tick. Returning any number of values to the parent - tick. Going to the server from the modal page and returning to the modal page - nope. Very frustrated
Nov 18 '05 #3

P: n/a
Some other suggestions of things you could try.

Use frames within your modal window. Submit the changes to one frame
(could even be a 'hidden' frame with height of 0) within the modal
window and ensure changes are reflected using JavaScript to "talk"
between the frames.

Use hidden form fields and JavaScript to save user entered parameters,
which avoids having to make a server round trip, and then just make
these changes when the final submission is made (which could then be
back to the opening page).

Matt
"CaptainZ" <an*******@discussions.microsoft.com> wrote in message
news:B7**********************************@microsof t.com...
Thingis that I want to be able to perform various actions on the modal window that relate to a SQL database, and when I am finished then return
to the parent.
I can't make it return to the modal window after going to the server after user input - which is the problem I would really like to get
around - and I can't work out any way to save user entered parameters
without doing a server side trip and ending up on a newly created,
non-modal, window.
Trouble is - how do I go to another web page, provide user interaction including server side work, and return values to the parent page whilst
not losing the parent's state and keeping the child page modal? The
parent is not (typical) simple and includes multipage datagrids and
numerous dropdownlists - so saving the state manually and reconstructing
it is not trivial - hence the desire to go modal and return to an
unchanged parent page.
But cannot figure out how. Modal - tick. Returning any number of

values to the parent - tick. Going to the server from the modal page and
returning to the modal page - nope. Very frustrated
Nov 18 '05 #4

P: n/a
Frames raises interesting possibilities - I seem to remember reading somewhere about frames being used to 'trick' asp.net...but can't remember the details.

I don't have a problem storing the data on the client side - just performing database accesses and then returning to the window I left, instead of ASP.Net opening a new window. (On postback it doesn't seem to 'remember' it came from a modal window - so it opens a new one.)

Thanks for your help with this..
Nov 18 '05 #5

P: n/a
As far as I can tell you can't actual change the url of the modal window
at all. It is not so much that on postback it doesn't remember it came
from the modal window, but more that the post request is always
submitted to a new window (this appears to be by design). The frame
methodology allows you to not change the url of the modal window, and
instead use the frames within the modal window.

Hope that helps a bit more.

Matt
http://www.3internet.co.uk

"CaptainZ" <an*******@discussions.microsoft.com> wrote in message
news:44**********************************@microsof t.com...
Frames raises interesting possibilities - I seem to remember reading somewhere about frames being used to 'trick' asp.net...but can't
remember the details.
I don't have a problem storing the data on the client side - just performing database accesses and then returning to the window I left,
instead of ASP.Net opening a new window. (On postback it doesn't seem to
'remember' it came from a modal window - so it opens a new one.)
Thanks for your help with this..

Nov 18 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.