473,327 Members | 2,071 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.

Posting from a modal dialog

abb
I have a modal dialog to edit a Notes field. When the Save button is
pressed, that field should save the Notes, close the dialog and leave
the parent window unchanged (don't refresh or post).

How can I accomplish that?

Posting from the modal dialog always pops up a new browser window.
And submitting from the parent sends the entire form (not just the
notes). Ideas?
Feb 28 '08 #1
4 1218
"abb" <an******@gmail.comwrote in message
news:f9**********************************@n77g2000 hse.googlegroups.com...
>I have a modal dialog to edit a Notes field. When the Save button is
pressed, that field should save the Notes, close the dialog and leave
the parent window unchanged (don't refresh or post).

How can I accomplish that?
I'm not quite sure what the problem is here... If you pop a modal dialog
(presumably you're using the non-standard window.showModalDialog method),
closing that dialog won't cause the parent window to refresh or post back
unless you explicitly code it...
Posting from the modal dialog always pops up a new browser window.
Put the following in the header of the dialog window:

<base target="_self" />

Try to avoid showModalDialog - they work only in IE and Safari...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Feb 28 '08 #2
abb
Yes, I'm using showModalDialog to pop up the window. But when the
popup submits, it always opens a new browser window even with
target="_self". I read somewhere that there is no way to prevent that
behavior with a modal dialog. Is that incorrect?
Feb 28 '08 #3
Check it again. <base target="_self" /should help. Did you put in the
<headsection of the page that opens in the popup?

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"abb" <an******@gmail.comwrote in message
news:e7**********************************@s13g2000 prd.googlegroups.com...
Yes, I'm using showModalDialog to pop up the window. But when the
popup submits, it always opens a new browser window even with
target="_self". I read somewhere that there is no way to prevent that
behavior with a modal dialog. Is that incorrect?

Feb 28 '08 #4
"abb" <an******@gmail.comwrote in message
news:e7**********************************@s13g2000 prd.googlegroups.com...
Yes, I'm using showModalDialog to pop up the window.
Presumably this is an internal intranet system, as you wouldn't use this on
a public Internet site...?
But when the popup submits, it always opens a new browser window even with
target="_self".
Are you absolutely certain you have it in the right place, and spelled
correctly...?

<head>
<base target="_self" />
</head>
I read somewhere that there is no way to prevent that behavior with a
modal dialog.
Is that incorrect?
That is incorrect.

However, as previously mentioned, you'd be much better off not using
showModalDialog at all, as there are far better ways of achieving the same
thing:
http://www.asp.net/AJAX/AjaxControlT...odalPopup.aspx
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Feb 28 '08 #5

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

Similar topics

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:...
2
by: Matt | last post by:
I reposted this question because I really want to accomplish this task. Please advise!! I want to post the form data (http://server/page1.asp) to a modal dialog window...
2
by: Gilles T. | last post by:
Hi, How I can refresh a modal dialog in asp.net? I open a modal dialog in first with a dropdownlist. To add a element in my dropdownlist (table), I open a second modal dialog to ask element and...
2
by: Matt | last post by:
I want to know how to submit the form data to a modal dialog window? The following is page1.asp, and when the user clicks submit button, it will post the form data to page2.asp by opening a new...
3
by: Russell | last post by:
I have a quirky issue that I believe involves timing and only 2 hairs left to pull. I have a modal dialog that is an IFrame. The IFrame contains another window - which contains the appropriate...
2
by: John | last post by:
Hi all, I have a modal dialog window from which a user selects a few rows from a datagrid and then clicks on an image button. My question is two-fold: 1. How do I post data back to the same...
0
by: DM | last post by:
Is there any way to have a web form opened as showModalDialog repost from client side script? I'm trying to reload a datagrid in a web form opened as a modal window but ithas to happen from client...
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...
4
by: mpreston | last post by:
I'm following the example from the MSDN library on how to create modal dialog boxes in C#, but something isn't working properly. If I create a modal dialog box and show it using ShowDialog(), the...
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
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...
1
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: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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

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.