473,473 Members | 1,533 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

AJAX: Closing a modal popup dialog

Okay, here's the situation: we want to be able to display ASPX pages
in an UpdatePanel. The reasons for this are performance related. The
site in development uses *lots* of modal popups from some pages, and
we don't want to load all that content until it's requested.

So, what we want to do is place an IFRAME inside an UpdatePanel and,
in the onclick event for the linkbutton or button control, set the SRC
so that the content is loaded on demand. So far, so good.

What I can't seem to figure out, at this point, is how you would go
about closing the modal popup once it's displayed. In theory, the
heirarchy looks like this:

Page
Button/LinkButton
ModalPopupExtender
UpdatePanel
IFrame
Page
OK/Cancel button

I'm relatively new to this Ajax business, but I've manged to figure
out how to get the page to load display in the IFrame when I want it
to, and that's all spiffy. Now I just need to know how to get it to
close in response to the user's actions.

Any help would be greatly appreciated.

Thanks!

Mike
Jul 31 '08 #1
3 3863
I can't answer your specific question, but I would put it all in a panel and
make it invisible unless you call the model popup. That way it wont load in
the page, and the buttons on the panel will close the model popup.

Marc
"Mike Hofer" <kc********@gmail.comwrote in message
news:ba**********************************@i76g2000 hsf.googlegroups.com...
Okay, here's the situation: we want to be able to display ASPX pages
in an UpdatePanel. The reasons for this are performance related. The
site in development uses *lots* of modal popups from some pages, and
we don't want to load all that content until it's requested.

So, what we want to do is place an IFRAME inside an UpdatePanel and,
in the onclick event for the linkbutton or button control, set the SRC
so that the content is loaded on demand. So far, so good.

What I can't seem to figure out, at this point, is how you would go
about closing the modal popup once it's displayed. In theory, the
heirarchy looks like this:

Page
Button/LinkButton
ModalPopupExtender
UpdatePanel
IFrame
Page
OK/Cancel button

I'm relatively new to this Ajax business, but I've manged to figure
out how to get the page to load display in the IFrame when I want it
to, and that's all spiffy. Now I just need to know how to get it to
close in response to the user's actions.

Any help would be greatly appreciated.

Thanks!

Mike

Jul 31 '08 #2
On Jul 31, 4:22*pm, "Marc " <RmEaMrO...@imarc.co.ukwrote:
I can't answer your specific question, but I would put it all in a panel and
make it invisible unless you call the model popup. That way it wont load in
the page, and the buttons on the panel will close the model popup.

Marc

"Mike Hofer" <kchighl...@gmail.comwrote in message

news:ba**********************************@i76g2000 hsf.googlegroups.com...
Okay, here's the situation: we want to be able to display ASPX pages
in an UpdatePanel. The reasons for this are performance related. The
site in development uses *lots* of modal popups from some pages, and
we don't want to load all that content until it's requested.
So, what we want to do is place an IFRAME inside an UpdatePanel and,
in the onclick event for the linkbutton or button control, set the SRC
so that the content is loaded on demand. So far, so good.
What I can't seem to figure out, at this point, is how you would go
about closing the modal popup once it's displayed. In theory, the
heirarchy looks like this:
Page
* Button/LinkButton
* ModalPopupExtender
* UpdatePanel
* * *IFrame
* * * * Page
* * * * * *OK/Cancel button
I'm relatively new to this Ajax business, but I've manged to figure
out how to get the page to load display in the IFrame when I want it
to, and that's all spiffy. Now I just need to know how to get it to
close in response to the user's actions.
Any help would be greatly appreciated.
Thanks!
Mike- Hide quoted text -

- Show quoted text -
On these three pages we're developing, each page displays up to eight
modal dialog boxes of varying complexity. Several of these dialog
boxes include data repeaters with *lots* of data. We don't want those
pages loading until the user asks for them.

(Don't ask me why these are being displayed in modal dialog boxes.
Let's just say the creative department was smoking some really good
stuff, and no one from the software engineering department was
involved at the time to restrain their "Gee Whiz" impulses.)

So, embedding eight different dialog boxes on a single page with data
repeaters and all their data is impractical on a *very* high traffic
web site. I need to load this stuff dynamically. Further, some of
these pages have unique styling requirements, and I don't want to load
the style sheets for all those dialog boxes and further bloat the
request size. If I can just load the page when it's asked for and it's
size (and script) requirements, that's optimal.

Thanks,
Mike

Jul 31 '08 #3
the easiest way to do this is two hidden buttons, one as the targetid,
and one as the okcontrolid. then from client script just fire the
correct click to open/close the popup. the ok button in the iframe would
call a routine the parent to close (which would just fire the hidden ok
button). when you close the popup set the iframe src to a empty page, so
when you open it again, you don't have the last page displaying

-- bruce (sqlwork.com)

Mike Hofer wrote:
Okay, here's the situation: we want to be able to display ASPX pages
in an UpdatePanel. The reasons for this are performance related. The
site in development uses *lots* of modal popups from some pages, and
we don't want to load all that content until it's requested.

So, what we want to do is place an IFRAME inside an UpdatePanel and,
in the onclick event for the linkbutton or button control, set the SRC
so that the content is loaded on demand. So far, so good.

What I can't seem to figure out, at this point, is how you would go
about closing the modal popup once it's displayed. In theory, the
heirarchy looks like this:

Page
Button/LinkButton
ModalPopupExtender
UpdatePanel
IFrame
Page
OK/Cancel button

I'm relatively new to this Ajax business, but I've manged to figure
out how to get the page to load display in the IFrame when I want it
to, and that's all spiffy. Now I just need to know how to get it to
close in response to the user's actions.

Any help would be greatly appreciated.

Thanks!

Mike
Aug 1 '08 #4

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

Similar topics

3
by: Earl Teigrob | last post by:
Can a Modal Dialog Box do forms ASP.NET forms validation from within the Modal Box? I want to pop up a dialog box to the user and have it do its own post backs with validation checking and then...
4
by: rdemyan | last post by:
I'm using code from the following web page to open the API Browse Folder dialog http://www.mvps.org/access/api/api0002.htm It all works fine. But if the dialog box is open and the user closes...
0
by: Nemisis | last post by:
Hi everyone, Does anyone know how to show an Ajax ModalPopup when a page loads? I would like to use it as a warning dialog for a company record, so that when a user navigates to a companies...
1
by: Samuel Rhodes | last post by:
hi i am using a ajax modal popup to allow the user to search an item and select the required item from the list. whenever i try to search the item, which causes a post back....the modal popup...
0
by: =?Utf-8?B?QWxCcnVBbg==?= | last post by:
I have a situation in which I need to check for data in either of two fields and display an alert if neither field contains data or if both fields contain data when the user clicks on a View...
3
by: SE.Computerguy | last post by:
I am trying to use the AJAX modal popup on a click event from a gridview. Any ideas on implementing this? The AJAX control is looking for a TargetControlID that will trigger the popup but the...
4
by: fran_j_diaz | last post by:
Hi, I have a page with an Ajax modal popup. I would like to know when my Modal popup is opened, my page still able to modify. Is it possible ? (I use Visual Studio 2005, c# )
5
by: =?Utf-8?B?SmFtZXMgUGFnZQ==?= | last post by:
Hi all Have a couple of issues with the modal popup extender (asp.net 3.5, vb.net, visual studio 2008): I have created a user control (e-mail enquiry form) which is designed to accept text...
2
by: Alec MacLean | last post by:
Hi, I have a page using AJAX. The page has three modal popups that work fine when I don't have field validators in place. As soon as I put a validator in place, the popup "form" the validator...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.