Hi
To create a modal popup in my aspx page I have put a RadWindow in the page like this:
<telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
<script src="scripts.js" type="text/javascript"></script>
<link href="styles.css" rel="stylesheet" />
<telerik:RadWindow RenderMode="Lightweight" ID="modalPopup" runat="server" Width="360px" Height="365px" Modal="true" OffsetElementID="main" Style="z-index: 100001;">
<ContentTemplate>
<div style="padding: 10px; text-align: center;">
</div>
<p style="text-align: center;">
RadWindow
</p>
</ContentTemplate>
</telerik:RadWindow>
and inside the scripts.js file I have this code:
function showDialogInitially() {
var wnd = $find("main_Content_Placeholder_modalPopup");
wnd.show();
Sys.Application.remove_load(showDialogInitially);
}
Sys.Application.add_load(showDialogInitially);
which works perfectly. but if I use this code instead:
var wnd = $find("main_Content_Placeholder_modalPopup");
wnd.show();
and put it at the end of the aspx file it won't show the window anymore.
so I suspect that has to do with the methods .add_load() and .remove_load() but I don't event know what they do.
can see what's going wrong?