473,804 Members | 2,024 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How get modal window to stay open?!!!

I am doing a simple master/detail page (gridview/detailsview).

I put the detailsview in a hidden panel and am using the modalpopupexten der
to display it.

The details view should allow view, insert and update/cancel.

PROBLEM: The popup works perfect. BUT, when I click ANYTHING, such as
'edit', or 'new', the model CLOSES. If I reopen the model I see that the
action has taken place. Any idea how I can PREVENT it from closing
automatically?
Oct 8 '08 #1
5 3273
"Bobby Edward" <bo***@nobody.c omwrote in message
news:O$******** ******@TK2MSFTN GP06.phx.gbl...
Any idea how I can prevent it from closing automatically?
<head>
<base target="_self" />
</head>
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Oct 8 '08 #2
I put it in an UpdatePanel and it seemed to fix it.

I'll have to research your solution.

For some reason though, when I hit the close button on the model I can't get
the page data to update. Any ideas?

"Mark Rae [MVP]" <ma**@markNOSPA Mrae.netwrote in message
news:%2******** ********@TK2MSF TNGP04.phx.gbl. ..
"Bobby Edward" <bo***@nobody.c omwrote in message
news:O$******** ******@TK2MSFTN GP06.phx.gbl...
>Any idea how I can prevent it from closing automatically?

<head>
<base target="_self" />
</head>
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Oct 8 '08 #3
"Bobby Edward" <bo***@nobody.c omwrote in message
news:ut******** ******@TK2MSFTN GP06.phx.gbl...
>>Any idea how I can prevent it from closing automatically?

<head>
<base target="_self" />
</head>
For some reason though, when I hit the close button on the model I can't
get the page data to update. Any ideas?
Not without seeing your code...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Oct 8 '08 #4
the modalpopup does not open a window. it just display a div that was
hidden. if your page does a postback, the page rerenders and the popup
is not displayed (unless you put javascript code to do it - bad idea).

if you put an update panel in the popup, then a rerender is not done, so
the popup does not disappear. if you click close, the div i just hidden,
and no async postback is done. if you need the close to save, replace
with an update trigger then generate javascript that close the popup.
i think you need to add a close method to the popup as it does not have one.

-- bruce (sqlwork.com)

Bobby Edward wrote:
I am doing a simple master/detail page (gridview/detailsview).

I put the detailsview in a hidden panel and am using the modalpopupexten der
to display it.

The details view should allow view, insert and update/cancel.

PROBLEM: The popup works perfect. BUT, when I click ANYTHING, such as
'edit', or 'new', the model CLOSES. If I reopen the model I see that the
action has taken place. Any idea how I can PREVENT it from closing
automatically?

Oct 9 '08 #5

"bruce barker" <no****@nospam. comwrote in message
news:O7******** ******@TK2MSFTN GP03.phx.gbl...
the modalpopup does not open a window. it just display a div that was
hidden. if your page does a postback, the page rerenders and the popup is
not displayed (unless you put javascript code to do it - bad idea).

if you put an update panel in the popup, then a rerender is not done, so
the popup does not disappear. if you click close, the div i just hidden,
and no async postback is done. if you need the close to save, replace with
an update trigger then generate javascript that close the popup. i think
you need to add a close method to the popup as it does not have one.

-- bruce (sqlwork.com)
Thanks. It really sounds like that's what I need to do. Do you have a link
that I can look at to read more (or sample code)? Thanks!
Oct 9 '08 #6

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

Similar topics

3
3345
by: DoubleM | last post by:
Hi, I'm running Python2.3.3c1 on Mandrake 9.1 The following code is designed to bring up a window with a button labeled "popup". Clicking on the popup buttons triggers a secondary window with a button labeled "ok". The second window is supposed to be modal - it should not be possible to reset the focus back to the first window or close the first window without first closing the second. The program works just fine in Windows XP...
1
12533
by: amith | last post by:
Hi, I have a javascript, calendar.js which i use to enable my client to select the date. This calendar pops up on the click of a gif image. But the problem is that this poped up window is not modal in nature(i do not want the user to go the parent page unless he selects some date in the calendar popup). In the javascript calendar.js he has used window.open() function to pop up the window. i just want to know whether we have any...
1
2864
by: Emma | last post by:
Hi, I didn't know whether it was best to post this here or on a mozilla-specific newsgroup, but I figured that you have all helped me in the past, so this is a good place to start. I have trawled the newsgroups for information on opening a modal dialog in Mozilla. I am using Mozilla 1.6 and have found that the following piece of code should work:- var w = window.open('http://www.hotmail.com', '_blank', 'modal');
6
9952
by: Ramanand.K | last post by:
var docCal function hello() { winCal= window.open("",null,"toolbar=0,status=0,menubar=0,fullscreen=no,width=195,he ight=245,resizable=0,top="+cnTop+",left="+cnLeft); docCal = winCal.document; RenderCal(); }
5
2501
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 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...
2
4940
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 the javascript command window.showModalDialog() we loose the current Session if a new window is opend from within the modal one (using the window.open() method). The "funny" thing is that this only occurs if another instance of IE has been
2
3690
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 dialog. To be more specific I want to have a confirmation dialog that is shown when a user clicks on a Delete button (which deletes some values from database). If Yes is pressed the delete action is processed otherwise modal dialog is closed.
4
10637
by: John Kotuby | last post by:
Hi all... I am bulding an application and wish to use custom Modal dialog windows. According to a couple of recent articles I have seen, the newer Mozilla browsers (actually I think they said Netscape) supported syntax like : window.open(URL ,"diagwin","modal=1, width=30"); For IE I use : window.showModalDialog
3
6468
by: Jimmy | last post by:
Is it possible to open a pop-up browser window (modal-style) inside another browser? e.g. // assuming something is calling this function inside the html as some event got triggered function doSomethingInDiffWindow() { // do something // open up a pop-up modal window // continue back on doing something after pop-up modal window
1
3820
by: Mike | last post by:
Hello, I have a Windows form that opens a modal dialog window. From there I can open yet another modal dialog window so I can grab some info to pass back to the first dialog. Both need to be modal and are launched like this: if (formName1.ShowDialog( this ) == DialogResult.OK) ......
0
9711
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9593
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10343
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10335
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10088
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9169
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5529
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5668
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4306
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 we have to send another system

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.