window.showmodaldialog
-
Hi, I am displaying a page using "window.showmodaldialog" to show some help to the user. Now I want to retrive the values selected by the user. I am using tables and tds to display the help. can any one guide me on how to get the user selection in the parent form from where this dialog is opend?? Chintan
-
Hi, I am displaying a page using "window.showmodaldialog" to show some help to the user. Now I want to retrive the values selected by the user. I am using tables and tds to display the help. can any one guide me on how to get the user selection in the parent form from where this dialog is opend?? Chintan
Hi, You can use the vArguments parameter of the showmodaldialog call. e.g.
var myObject = new Object();
myObject.firstName = "Andy"; // an example, you'd get these from the page probably
myObject.lastName = "Quinn;
window.showModalDialog("showModalDialog.htm", myObject, sFeatures);and in the showModalDialog.htm page:
...
function onLocalLoad
{
var myObject = window.dialogArguments;
var elPlaceHolder1 = document.getElementById("idSpan1");
if (myObject && elPlaceHolder1)
{
// do what you need to do
elPlaceHolder1.innerText = myObject.firstName + " " + myObject.lastName;
}
}<span id='idSpan1'></span>
Hope this helps, Andy