If you are using the window as a 3 page wizard is it possible to set the window arguments on a button click on page 2 that will be used in the OnClientClose event when the window is closed using the x or another close button on page 3?
Here is how I am trying to set the arguments on page 2
function
GetRadWindow() {
var
oWindow =
null
;
if
(window.radWindow)
{
oWindow = window.radWindow;
}
else
if
(window.frameElement !=
null
&& window.frameElement.radWindow)
{
oWindow = window.frameElement.radWindow;
}
return
oWindow;
}
function
OnClientClose(oWnd, args) {
var
arg = args.get_argument();
if
(arg) {
if
(arg.functionName) {
if
(arg.functionName ==
"ajaxRequest"
) {
var
eventArg = arg.functionArg;
ajaxMngrRequest(eventArg);
}
}
}
else
{
alert(
'No Arg'
);
}
oWnd.remove_close(OnClientClose);
}
function
SetReturnArgs(varFunction, varArg) {
var
oWnd = GetRadWindow();
var
oArg =
new
Object();
oArg.functionName = varFunction;
oArg.functionArg = varArg;
oWnd.argument = oArg;
}
protected void btnSetArgs_Click(object sender, System.EventArgs e)
{
ScriptManager.RegisterClientScriptBlock(
this
.Page,
this
.GetType(),
"WebUserControlScript"
,
"SetReturnArgs('ajaxRequest', 'eventArg')"
,
true
);
}
Thanks in advance!!!
Regards,
Dave