This is a migrated thread and some comments may be shown as answers.

Open RadConfirm after postback

1 Answer 35 Views
Window
This is a migrated thread and some comments may be shown as answers.
Raymond
Top achievements
Rank 1
Raymond asked on 15 Sep 2009, 03:11 AM
I am able to do this with 2009 Q1

 

string strMessage = "Do you want to add items now?";

 

JS =

" Sys.Application.add_init(CRInit);";

 

JS +=

" function CRInit(){ Sys.Application.add_load(SRRunOnce);}";

 

JS +=

" function SRRunOnce(){ showConfirmation(); Sys.Application.remove_load(SRRunOnce);}";

 

JS +=

" function GetRadWindow1(){";

 

JS +=

" var oWindow = null;";

 

JS +=

" if (window.radWindow) oWindow = window.radWindow;";

 

JS +=

" else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;";

 

JS +=

" return oWindow;";

 

JS +=

"}";

 

JS +=

" function showConfirmation(){";

 

JS +=

" function CallBackFn(arg){";

 

JS +=

" var oWindow = GetRadWindow1();";

 

JS +=

" if (arg == 'Yes'){";

 

JS +=

" window.location = 'ComponentReworkPackSlipItemDetail.aspx?R=Y&A=A&pid=" + oPackingSlip.PackingSlipReworkId.ToString() + "';";

 

JS +=

" }";

 

JS +=

" else {";

 

JS +=

" oWindow.Close();";

 

JS +=

" oWindow.BrowserWindow.refreshGridAndLocate(" + oPackingSlip.PackingSlipReworkId.ToString() + ");";

 

JS +=

"}";

 

JS +=

"}";

 

JS +=

" radconfirm('" + strMessage + "', CallBackFn, 530, 100, null, 'Confirm Add Item');";

 

JS +=

"}";

 

 

ScriptManager.RegisterStartupScript(Page, this.Page.GetType(), key, JS, true);

 

}


After user click a button to update to database, the page will prompt user to determine whether add line item now. The above works fine.

However, when updating to 2009Q2, the code is no longer work with JS error message of "object doesn't support this property or method".

Please advice how to resolve this.

1 Answer, 1 is accepted

Sort by
0
Fiko
Telerik team
answered on 17 Sep 2009, 03:52 PM
Hi Raymond,

I am not quite sure what is causing the problem in your case but the provided code work on my side. I made a little bit changes in thecode - the result of the radconfirm dialog is a Boolean value not a text.
In this case, could you please rework my test project in order to reproduce the error and send it back? I will check it and do my best to provide a working solution.

All the best,
Fiko
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Window
Asked by
Raymond
Top achievements
Rank 1
Answers by
Fiko
Telerik team
Share this question
or