Link to home
Start Free TrialLog in
Avatar of karakav
karakav

asked on

ASP.NET,Javascript,Ajax: How to get a string from window.showModalDialog

Hi there,
I would like to know how I can get a string from a modal dialog and use it on the parent form using window.showModalDialog
ASKER CERTIFIED SOLUTION
Avatar of P_Ramprathap
P_Ramprathap
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
you can call the modal dialog page as
var retVal = window.showModalDialog("ShowMailDetail.aspx

and in the modal dialog before closing the window you have to set
returnValue = "your return string should be specified here";
use window.returnValue in the document loaded in showModalDialog window. That can be accessed as a return value of the method call like below

var returnData = window.showModalDialog("test.html");

Thanks
Ajitha
Avatar of karakav
karakav

ASKER

Thanks.