I am using radwindow to display a popup window, showing content, on the click of an asp button.
The problem is, the window loads, appears and disappears less than second later. It is too quick for me to even see what content comes up/how it looks.
Here is my code:
<script type="text/javascript">
function openWin(string Url) {
var oWnd = radopen(Url, "RadWindow4");
oWnd.moveTo(50, 200);
}
</script>
Called from:
<asp:Button ID="Button5" CssClass="btn" runat="server" Text="Labs" OnClientClick="openWin('Labs.aspx');" />
Any idea what is wrong?
6 Answers, 1 is accepted
The asp:button control will initiate a postback once it is clicked - you need to cancel it in order to keep the dynamically created RadWindow on the page.
e.g:
<asp:Button ID="Button5" CssClass="btn" runat="server" Text="Labs" OnClientClick="openWin('Labs.aspx'); return false;" /> |
Best wishes,
Georgi Tunev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.

Thanks for that!
The only other issue is when I load the window from clicking a button, the buttons/icons in the window don't appear right. See below:
[URL=http://img27.imageshack.us/my.php?image=telerikissue.jpg][IMG]http://img27.imageshack.us/img27/8596/telerikissue.th.jpg[/IMG][/URL]
Judging from the screenshot, I would say that the problem is due to global styles that you are using on the same page - using global styles with third party controls is not recommended as they interfere with their appearance just like in your case.
Please check and edit your CSS. If you still experience problems after that, I would like to ask you to open a support ticket and send me a small sample project (make sure it can be run locally) where I could examine your setup more closely.
Greetings,
Georgi Tunev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.

Thanks, solved the problem. I deleted some redundant CSS styles in my stylesheet.
As I am using a trial, the support options aren't open to me.
Thanks

There is also same problem,Popup come and disappear soon,what will be the problem
var alarmsCookie = getActCookie("AlarmsDue");
if ( alarmsCookie == null )
return;
if (alarmsCookie == "true") {
var isDiagOpen = getActCookie ( "IsDialogOpen" );
if ( isDiagOpen == "false" )
{
var alarmDiagURL = ALARM_PATH + 'AlarmListDialog.aspx'
var parent, options, diag;
options = new ACT.ModalWindowOptions(280, 510);
diag = new ACT.ModalWindow(alarmDiagURL, options, true);
diag.show();
}
}
Hi P,
Try to call return false in the OnClientClick event of the button which opens the dialog:
<asp:Button ID="Button5" CssClass="btn" runat="server" Text="Labs" OnClientClick="openWin('Labs.aspx'); return false;" /> |
Another thing to try is to place the return false after the diag.show() method:
...
var parent, options, diag;
options = new ACT.ModalWindowOptions(280, 510);
diag = new ACT.ModalWindow(alarmDiagURL, options, true);
diag.show();
return false;
...
If the above does not help, please provide a sample runnable project/page which showcases the issue.
Best Regards,
Rumen
Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.