473,385 Members | 2,243 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,385 software developers and data experts.

MSDN help dialogArguments example desn't work

DM
This example copied from MSDN help does not work on any of my PC's. When
the dialog opens, itdisplays a blank page. I'm trying to create a dialog
that calls a function in the page that opened it but am not having any luck.
Any ideas?

================================================== ===============
The following example shows how to retrieve information passed into a modal
dialog window using the dialogArguments property. This example consists of
two snippets of code, which correspond to two different files. One file
launches the modal window and the other file stores the code for the modal
window.

This file launches the modal window and sends an object to that modal
window.

Hide Example

<HTML>
<HEAD>
<SCRIPT>
function fnLaunch()
{
var aForm;
aForm = oForm.elements;
var myObject = new Object();
myObject.firstName = aForm.oFirstName.value;
myObject.lastName = aForm.oLastName.value;
// The object "myObject" is sent to the modal window.
window.showModalDialog("modalDialogSource.htm", myObject,
"dialogHeight:300px; dialogLeft:200px;");
}
</SCRIPT>
</HEAD>
<BODY>
<BUTTON onclick="fnLaunch();" >Launch The Window</BUTTON>
<FORM ID= "oForm">
First Name:
<INPUT TYPE="text" NAME="oFirstName" VALUE="Jane">
<BR>
Last Name:
<INPUT TYPE="text" NAME="oLastName" VALUE="Smith">
</FORM>
</BODY>
</HTML>
This file (modalDialogSource.htm), stores the code for the modal window. The
object sent to this modal window is retrieved using the dialogArguments
property.

Hide Example

<HTML>
<HEAD>
<SCRIPT>
var oMyObject = window.dialogArguments;
var sFirstName = oMyObject.firstName;
var sLastName = oMyObject.lastName;
</SCRIPT>
<title>Untitled</title>
</head>
<BODY STYLE="font-family: arial; font-size: 14pt; color: Snow;
background-color: RosyBrown;">

First Name:
<SPAN STYLE="color:00ff7f">
<SCRIPT>
document.write(sFirstName);
</SCRIPT>
</SPAN>
<BR>
Last Name:
<SPAN STYLE="color:00ff7f">
<SCRIPT>
document.write(sLastName);
</SCRIPT>
</SPAN>
</BODY>
</HTML>
Nov 18 '05 #1
0 1132

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

Similar topics

1
by: Catherine Jones | last post by:
Hello, The security sinks example provided as part of the below mentioned article in MSDN does not work in .NET 1.1. Can you please provide the configuration file for making this work with 1.1...
2
by: yoramo | last post by:
I'm writing a 'print template' and in the script I need to use the dialogArguments. Every time I'm calling a method or property of the dialogArguments. I'm getting a dialog message with the...
12
by: Stamen Gortchev | last post by:
Hi all, I think there is an inherent problem with most examples on the internet (with MSDN, too!) showing datagrid's databinding. Here is, how they look like: ======================== On...
1
by: Rogers | last post by:
When I tried to run an application developed by VB.net in IIS6,This error occured,The error message is "Current credit level setting desn't support Debuging"(in chinese),I dont't know how to...
1
by: louise raisbeck | last post by:
Hi there, I have a bit of a chicken and egg situation. I have a page_load event in my c# code which does things with some textbox values in my aspx form. It is a dialog window and i set the values...
1
by: fiaolle | last post by:
Hi I Can't get the MSDN's example for Listbox to work.The example is below. I get an error in Listbox's sub ListBox1_SelectedValueChanged at row textBox1.Text = ListBox1.SelectedValue and it...
0
by: DirkMS | last post by:
Dear Support, I am looking for a working example to get mailslots running in VB.NET from CreateMailslot i get something looking like a handle but if i try to do something with it, i get an error...
3
by: codefragment | last post by:
Hi I'm stuck with the basics of CAS. I have a solution with two projects, Assembly1 and Assembly2. Assembly1 is happily making calls to the registry, filesystem, etc Assembly1 calls a method on...
2
by: thirish | last post by:
hi, when i click from parent jsp page i am opening a pop with some value. for this i am useing below method. Useing this method i am able to open the popup. retObj = ShowModalDialogWithPost(url,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
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...

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.