I have a puzzling situation I need some help with here please. I am trying to cause my button to open a RadWindow( Another page in a PopUp), and I would appreciate any help I can get with this please.
I have a simple button on my form (A UserControl Form). What I would like to do is pop open a RadWindow when the button is clicked . What currently happens is a window opens and then closes, almost immediately.
I have the code below in my code behind
Private Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init
BtnGenerateReport.Attributes("onclick") = " return GenerateSelectedReport('" & intPrimaryKey & "');"
End Sub
And on the client side, I have
function GenerateSelectedReport(reportid) {
var wlink = "Popuppage.aspx?intRptKey=" + reportid
window.radopen(wlink, "REPORT GENERATOR");
oWnd.center();
return true;
}
Why are you returning "true" in GenerateSelectedReport? Try changing it to false and see what happens.
The problem is occuring because the button is causing a postback that you need to cancel. Returning false will cancel the button action after the Javascript has run.