473,765 Members | 2,047 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Posting data back to a modal dialog window

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 dialog window?

2. The dialog window in question was, in turn, created from a dialog window.
I need to post data back to that one too (that which the user selected in
the top-most dialog window). How do I send data back to this window?

Regards
John.
Nov 17 '05 #1
2 7086
Hi John,
Posting back in a modal dialog box has not worked for me in the past.

I woud like to see if it works for you?

Cheers,
Angus

"John" <a@b.com> wrote in message
news:OK******** *****@TK2MSFTNG P12.phx.gbl...
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 dialog window?

2. The dialog window in question was, in turn, created from a dialog window. I need to post data back to that one too (that which the user selected in
the top-most dialog window). How do I send data back to this window?

Regards
John.

Nov 17 '05 #2
Hi

2 ways to post to a dialog

1 Place a iframe/frameset in the dialog and host the page there
2 <base target="_self">

Returning value to the opener:
( Iframe )
parent.window.r eturnValue = theValue;
parent.window.c lose();

( Frameset )
top.returnValue = theValue;
top.close();

(<base target="_self"> )
window.returnVa lue = theValue;
window.close();

Getting value in the opener
var res = showModalDialog (........);
if(typeof(res) != "undefined" ) alert(res);

If returning more than 1 value you can use comma delimited.....

More info
http://msdn.microsoft.com/library/de...ence_entry.asp
http://msdn.microsoft.com/library/de...oriJScript.asp

--
Best Regards
Vidar Petursson
=============== ===============
Microsoft Internet Client & Controls MVP
=============== ===============
"John" <a@b.com> wrote in message
news:OK******** *****@TK2MSFTNG P12.phx.gbl...
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 dialog window?

2. The dialog window in question was, in turn, created from a dialog window. I need to post data back to that one too (that which the user selected in
the top-most dialog window). How do I send data back to this window?

Regards
John.

Nov 17 '05 #3

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

Similar topics

1
1749
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 window. But I want modal dialog window, any ideas?? <form action="page2.asp" method="post" target="_blank"> <input type="text" name="username"> <input type="submit" name="submit"> </form>
0
1846
by: Nonoy of Philippines | last post by:
Hello, guys... I'm just starting to develop web applications and I have this problem regarding Session objects At some parts of my application, I open modal dialog window which also opens another window to display a report. To do this, I use the values of Sessions I initialize at the windows that called the modal dialog box. However, I noticed that the values of my Sessions were gone when I opened the modal dialog window ONLY when...
1
2800
by: Matt | last post by:
I want to post the form data (http://server/page1.asp) to a modal dialog window (http://server/modaldialog.asp) with a desired height 200px by width 200px. Here's my attempts and problems: Attempt #1) In http://server/page1.asp, it has code <form action="http://server/modaldialog.asp" method="post" target="_blank"> In http://server/modaldialog.asp, it has code <body onBlur = "self.focus()">
2
4938
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
8
4585
by: Craig G | last post by:
i have a page with a grid that is opened in a modal dialog. when it posts back it opens a new window for the page can it postback to itself? i tried setting the target of the form showing within the dialog to "_self" but no joy Cheers, Craig
2
3686
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.
0
1804
by: homsar | last post by:
I've seen many posts discussing the options we have when using modal windows within a web based application. Often times it seems the greatest hurdle is simply getting the modal window to post back to itself. It appears that most of these threads where this was discussed have been archived, so I'm bringing this topic up again to offer a couple suggestions on this topic. I noticed that most people use the concept of posting to an iFrame. I...
4
1233
by: abb | last post by:
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?
11
2377
by: VK | last post by:
In the continuation of the discussion at "Making Site Opaque -- This Strategy Feasible?" and my comment at http://groups.google.com/group/comp.lang.javascript/msg/b515a4408680e8e2 I have realized that despite suggestions to use DHTML-based modal dialogs are very common? there is not a single fully functional reliable copyright-free cross-browser alternative to say MsgBox (VBScript) or showModalDialog (IE). This way such suggestions up to...
0
9568
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
10164
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10007
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
9959
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
9835
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
8833
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...
1
7379
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6649
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
3
2806
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.