473,563 Members | 2,735 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

modal forms and postback

Hi, is there a way to get a form to post back to a modal dialog box when it
was posted from a modal dialog to start with? here is the problem... I have
a form with combo boxes and when you select one then click on an add button
it adds the item to a list box, but when you click on add (this is in a
modal dialog box) it opens the postback in a new window outside of the modal
dialog box, how do you force it to postback to the modal dialog? thanks
Nov 18 '05 #1
4 3104
Hi,

Yes. it well Known behaviour of model windows. in order to work around
put IFrame in your model window and place all previous model HTML inside
IFrame. now, on postback no new window will be open.

HTH

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)52-8888377
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #2
I am using the following trick in modal windows with postback:

<body>
<!-- Set window name for the form to be loaded in the same window after
round trip -->
<script language="javas cript">window.n ame="modal";</script>
<form id="myForm" method="post" runat="server" target="modal">

Eliyahu

"Brian Henry" <br**********@n ewsgroups.nospa m> wrote in message
news:e8******** ********@TK2MSF TNGP11.phx.gbl. ..
Hi, is there a way to get a form to post back to a modal dialog box when it was posted from a modal dialog to start with? here is the problem... I have a form with combo boxes and when you select one then click on an add button it adds the item to a list box, but when you click on add (this is in a
modal dialog box) it opens the postback in a new window outside of the modal dialog box, how do you force it to postback to the modal dialog? thanks

Nov 18 '05 #3
Hi,

simply in the modal window put this to the <HEAD>

<BASE target="_self">

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
http://blogs.aspadvice.com/joteke

"Brian Henry" <br**********@n ewsgroups.nospa m> wrote in message
news:e8******** ********@TK2MSF TNGP11.phx.gbl. ..
Hi, is there a way to get a form to post back to a modal dialog box when it was posted from a modal dialog to start with? here is the problem... I have a form with combo boxes and when you select one then click on an add button it adds the item to a list box, but when you click on add (this is in a
modal dialog box) it opens the postback in a new window outside of the modal dialog box, how do you force it to postback to the modal dialog? thanks

Nov 18 '05 #4
thanks that worked great!
"Teemu Keiski" <jo****@aspalli ance.com> wrote in message
news:ue******** ******@TK2MSFTN GP09.phx.gbl...
Hi,

simply in the modal window put this to the <HEAD>

<BASE target="_self">

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
http://blogs.aspadvice.com/joteke

"Brian Henry" <br**********@n ewsgroups.nospa m> wrote in message
news:e8******** ********@TK2MSF TNGP11.phx.gbl. ..
Hi, is there a way to get a form to post back to a modal dialog box when

it
was posted from a modal dialog to start with? here is the problem... I

have
a form with combo boxes and when you select one then click on an add

button
it adds the item to a list box, but when you click on add (this is in a
modal dialog box) it opens the postback in a new window outside of the

modal
dialog box, how do you force it to postback to the modal dialog? thanks


Nov 18 '05 #5

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

Similar topics

3
6629
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 to its initial position when the user posts back (by clicking a button, etc.) I have all of the fundamentals for asp.net modal dialogs in place,...
4
1810
by: news | last post by:
Not really sure if this is a javascript problem or C# - sorry if in wrong place. Modal Forms Question in Web Application I have two web forms: Form1 and Form2 Form1 calls Form2 using showModalDialog var WinSettings = "resizable:no;dialogHeight:600px;dialogWidth:600" var result = window.showModalDialog("Form2.aspx",null, WinSettings);
5
2473
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...
3
2868
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 save the data and close the dialog when the page is valid. I have read a little about using Iframes to post back to, but was wondering if this would...
2
2298
by: A Traveler | last post by:
Hello all, Here is my situation... i have a page which has a dropdown of companies. Next to it i have a "New" button for creating a new company. What i would like to do is to show a modal dialog with the company entry screen, then once it is dismissed, let the button continue with its postback and rebind the companies dropdown to include...
10
2737
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 preview DIV) 2. when users close the dialog, the application receives the URL to the selected graphic. 3. the modal dialog lets the users upload a new...
5
3870
by: Nick Poulis | last post by:
In my page I use window.ShowModalDialog ---------------------------------------------------------------- Page.RegisterStartupScript("PopUpPerson", _ "<script language=""Javascript"">" & vbCrLf & _ "window.showModalDialog('Person.aspx?id=" & SelectedPersonID & "','','dialogWidth:720px; dialogHeight:450px; status:off; center:Yes; help:No;...
2
3672
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...
2
3491
by: diogenes | last post by:
I have created many shortcut/popup (aka context, or right-click) menus for my application - instead of toolbars or standard drop-down menus. Within my custom menu, I am using =ShowMainMenu("item") in the On Action event where ShowMainMenu is a public function in frmMain, and "item" is a string mapping to a button click event. (error...
0
7659
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...
0
7580
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...
0
7882
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7634
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...
1
5481
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5208
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3634
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...
1
1194
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
916
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.