473,327 Members | 1,919 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,327 software developers and data experts.

Submission of modal dialogs

Hi,

I'm opening an ASP.NET page using the JavaScript window.showModalDialog
method. This page has a submission button on it which, when clicked, opens a
new window, which is pretty much as expected. However, I want it to keep the
submission within the modal dialog. Looking round the net, it seems that
this is not an uncommon problem and that people are using an iframe to solve
it. Fair enough - that's not difficult.

However, I'm interested to know:

1) is there really no other way to achieve this in ASP.NET?

2) just how badly does this break browser compatibility?

Thanks,

Mark
Nov 18 '05 #1
2 1299
The showModalDialog is an IE only mehod so it totally breaks cross-browser
compatibility. Also, because it is a modal dialog to the parent window, the
only way to submit the values are to also submit the parent window. It is
all client side functionality so really ASP.NET doesn't change it.

The problem I see people having a lot is that they want the modal window to
remain open and continue from where they were after the submission. To do
that, I think the only way is to do something like setting a client side
script to reopen the dialog in from the window.onload client event.

From your question, I am assuming you know enough about using the dialog to
pass variables from the parent to the dialog, and back to the parent again,
so it should be pretty easy...

Create the dialog while passing required values->process user input->pass
user input back to parent->save parent state in hidden (or not hidden, if
appropriate) form elements->submit parent->recreate parent values in
codebehind->parent reloads and extracts the values->parent recreates its own
state->parent recreates dialog passing state to dialog again.

The end result, even if it's a long way to get there, is as if you kept the
submit functionality in the dialog.

If there's another way to do it, I haven't seen one.

Dale Preston
MCAD, MCSE, MCDBA


"Mark Rae" <ma**@mark-N-O-S-P-A-M-rae.co.uk> wrote in message
news:#j**************@TK2MSFTNGP09.phx.gbl...
Hi,

I'm opening an ASP.NET page using the JavaScript window.showModalDialog
method. This page has a submission button on it which, when clicked, opens a new window, which is pretty much as expected. However, I want it to keep the submission within the modal dialog. Looking round the net, it seems that
this is not an uncommon problem and that people are using an iframe to solve it. Fair enough - that's not difficult.

However, I'm interested to know:

1) is there really no other way to achieve this in ASP.NET?

2) just how badly does this break browser compatibility?

Thanks,

Mark

Nov 18 '05 #2
"Dale" <da************@msndotcomNot.Net> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
From your question, I am assuming you know enough about using the dialog to pass variables from the parent to the dialog, and back to the parent again, so it should be pretty easy...
Yeah - that in itself isn't the problem. I was merely wondering if there
wasn't a more efficient ".NET" way of achieving the same functionality...
If there's another way to do it, I haven't seen one.


That's what I'm finding...
Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Bjoern Obermeyer | last post by:
Hi, I am writing an application with a JFrame as the main window and several dialogs to gain user input. The problem arises when another window (from a differnent apllication) hides my...
3
by: Rod | last post by:
I have an asp.net application where some of the interaction with the user is through modal dialog windows. This works very well except for the annoying fact that the dialog window always returns...
3
by: Andrew Baker | last post by:
OK this has me perplexed, puzzled and bamboozled! I have a remoting service which I displayed a message box in. I then wondered what would happen if a client made a call to the service while the...
2
by: cassidyc | last post by:
Hi, I was wondering if anyone has come accross this issue? And if they have any solutions I have that can create new copies of itself Form1 as = new form1(); af.show(); This form can also...
2
by: Ricky K. Rasmussen | last post by:
Hi NG, We have a rather large ASP.NET application that uses popups to display various dialogs to the user. In our work we've come over a rather annoying "bug": If we open a modal dialog using...
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: wendy | last post by:
I have got a problem while using the modal dialogs. In my code I need to open a modal dialog from the parent page and I need to enter some values in the dialog and save it. It takes the values...
2
by: sthrudel | last post by:
Hi! I'm working on a web application in Asp.net and what I would like to have is a cross borwser modal dialog which accepts user's input. I would like to catch what the user clicked on the...
23
by: Chukkalove | last post by:
Im sorry, I dont know the correct description for a hierarchy of parent and child forms. I have a main form that opens a child form modally. This child form in turn opens it's own child form...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.