1. Detect if browser support modal dialog or not and then assign arguments
var vArguments = new Object(); vArguments.test1 = "test1 data"; vArguments.test2 = "test2 data"; if (window.showModalDialog) { window.showModalDialog(sURL, vArguments, sFeatures); } else { window.dialogArguments = vArguments; window.open(sURL, "_blank", sFeatures); }
2. Now inside the pop-up window access the arguments
var dialogArguments ; if (window.showModalDialog) { dialogArguments = window.dialogArguments; } else { dialogArguments = window.opener.dialogArguments; } alert(dialogArguments.test1); alert(dialogArguments.test2);
Now this should work like a charm.
Man is still the most extraordinary computer of all. ~John F. Kennedy
Great Article
ReplyDeleteASP.NET MVC Training
Online MVC Training
Online MVC Training India
Dot Net Training in Chennai
.Net Online Training
.net training online
Dot Net Online Training
C# Training