473,486 Members | 2,114 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

passing values to showmodal dialog

I have parent.aspx web page from which I call a modal dialog (child.aspx via showmodaldialog). I'd like to populate two text boxes, <asp:TextBox id=txt_HN> on the child form with data from the caller.
for parent.aspx.....
<script> block
function UpdH(title,horse)
{
var iParms=new Object();
iParms.Name=horse;
....}
for child.aspx....
<script> block
I've tried "document.getElementById('txt_HN').value=iParms.Ho rse;" within child.aspx form - but get error "document.getElementbyId(...) is null or not an object". How do I do this?
Nov 18 '05 #1
1 3986
David,

Try dialogArguments.window.document.getElementById.... .

using the following to open your window in javascript:

var TestWindow = new Object();
TestWindow.caller = window.showModalDialog(URLstr, window, sFeatures);

replacing the parameters there with whatever you use as appropriate.

Raymond Lewallen
"DavidS" <Da****@discussions.microsoft.com> wrote in message
news:56**********************************@microsof t.com...
I have parent.aspx web page from which I call a modal dialog (child.aspx via showmodaldialog). I'd like to populate two text boxes, <asp:TextBox
id=txt_HN> on the child form with data from the caller. for parent.aspx.....
<script> block
function UpdH(title,horse)
{
var iParms=new Object();
iParms.Name=horse;
...}
for child.aspx....
<script> block
I've tried "document.getElementById('txt_HN').value=iParms.Ho rse;" within

child.aspx form - but get error "document.getElementbyId(...) is null or not
an object". How do I do this?
Nov 18 '05 #2

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

Similar topics

4
4860
by: Ron Rohrssen | last post by:
I want to show a dialog and when the form (dialog) is closed, return to the calling form. The calling form should then be able to pass the child form to another object with the form as a...
8
4393
by: Johnny | last post by:
I'm a rookie at C# and OO so please don't laugh! I have a form (fclsTaxCalculator) that contains a text box (tboxZipCode) containing a zip code. The user can enter a zip code in the text box and...
13
2457
by: Deano | last post by:
Apparently you can only do this with one value i.e Call MyAssetLocationZoom(Me!txtLocation, "Amend data") This runs; Public Sub MyAssetLocationZoom(ctl As Control, formName As String) On...
0
1017
by: janaki | last post by:
Hi, I am using showmodaldialog in my javascript and my application uses STRUTS. First time when i opens the dialog it is going into the action class and opens fine with the required...
6
4712
by: kath | last post by:
hi everyone......... I have a task, I have fragmented the task into subtask. I have planned to create a class to each subclass and one parent class to handle the sub tasks. Each subclass are...
13
2107
by: ateale | last post by:
Hey Guys I know I am missing some important points on how to use the python language. Is it possible to pass variables between methods (is that what theyare called?) in my attempt below I have...
2
1365
by: mcmalburg | last post by:
I have a dialog box (form) that configures items in a class. I'm wanting make sure that I handle OK and Cancel properly and that I also manage memory (I hate the fact the C# supposedly does this...
6
3683
by: Iain King | last post by:
Hi. I have a modal dialog whcih has a "Browse..." button which pops up a file selector. This all works fine, but the first thing the user has to do when they open the dialog is select a file, so...
2
2674
darksteel21
by: darksteel21 | last post by:
is there any one can help me....i have a problem in displaying showmodal dialog box in mozilla firefox browsers...showmodal dialog box wont work on firefox browsers but on IE it works fine..can...
0
7100
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
7126
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,...
1
6842
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...
0
7330
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...
0
5434
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
4559
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
3070
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
3070
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
598
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.