473,386 Members | 1,973 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Modal Windows Server side processing

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
5 2458
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Ricardo Tineo | last post by:
Hi.. i'm start to developing a web application in ASP.NET. In a requirement i need display modal pages to retrieve additional information. How is possible to do this in ASP.NET? I seen examples...
2
by: martin de vroom | last post by:
Hi, I have a web page that opens a modal dialog (client side) in the following manner onclick="window.showModalDialog('/dialog.asp',null,'dialogHeight: 200px; dialogWidth: 400px; dialogTop:...
5
by: CaptainZ | last post by:
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...
4
by: Mark Goldin | last post by:
What is a best way to create modal forms in ASP.NET?
7
by: Mark Goldin | last post by:
If I want to open a new ASPX page when the user clicks on a button do I use JS for that? What would be a point of having AutoPostBack enabled for that button if I cannot use server side to open a...
10
by: Guadala Harry | last post by:
I have a modal dialog that currently does all of the following except item 4. 1. lets users select a graphic from a list of thumbnails (and when selected, displays the full-size image in a...
1
by: Carlos Alejandro Pérez | last post by:
hi I need to perform this sequence: - a webform A calls another webform B. Webform B should be a modal one - when data is entered in webform B, the user chooses close window - the data must be...
1
by: Davey P | last post by:
I am able to open a modal dialog on a button click from the code behind by placing a RegisterClientScriptBlock() method in the button click event handler. This all works fine, but the problem is...
8
by: Stephen Rice | last post by:
Hi, I have a periodic problem which I am having a real time trying to sort. Background: An MDI VB app with a DB on SQL 2000. I have wrapped all the DB access into an object which spawns a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.