Hi Guys,
I need to open a rad window on a button click but only if the correct condition has been met.
I am trying to open my Rad Window with C# code behind by calling a javascript function.
The window i am trying to open has its own controls on it.
JS i am using to open the Rad Window
Rad Window which is declared on the page where i am clicking the button
C# code behind button click
it seems like the window wants to open but closes immediately.
I need to open a rad window on a button click but only if the correct condition has been met.
I am trying to open my Rad Window with C# code behind by calling a javascript function.
The window i am trying to open has its own controls on it.
JS i am using to open the Rad Window
// shows the notificationForm on the new incident page.
function
showNotification() {
var
oWnd = radopen(
"Notify.aspx"
,
"Notifications"
,
"740"
,
"200"
);
}
Rad Window which is declared on the page where i am clicking the button
<
telerik:RadWindowManager
ID
=
"RadWindowManager1"
runat
=
"server"
>
<
Windows
>
<
telerik:RadWindow
ID
=
"Notifications"
runat
=
"server"
Title
=
"Notifications"
Modal
=
"true"
ShowContentDuringLoad
=
"false"
ReloadOnShow
=
"True"
ViewStateMode
=
"Enabled"
VisibleStatusbar
=
"false"
Behavior
=
"None"
Behaviors
=
"None"
VisibleTitlebar
=
"false"
>
</
telerik:RadWindow
>
</
Windows
>
</
telerik:RadWindowManager
>
C# code behind button click
protected
void
btnSave_Click(
object
sender, EventArgs e)
{
if
(HasNotifications)
{
// Do something
}
else
{
Page.ClientScript.RegisterStartupScript(
this
.GetType(),
"OpenWindow"
,
"showNotification();"
,
true
);
}
}
it seems like the window wants to open but closes immediately.