How to use Window as a splash screen?

3 posts, 0 answers
  1. Hassan Yasir
    Hassan Yasir avatar
    11 posts
    Member since:
    Apr 2010

    Posted 05 May 2010 Link to this post

    Here is my window.   
    <telerik:RadWindow ID="Win1" VisibleOnPageLoad="true" runat="server"
            VisibleStatusbar="false"
            Animation="Fade" ShowContentDuringLoad="false" VisibleTitlebar="false" Behaviors="None" Modal="false">
    <contentTemplate>
    <img src="myimage.jpeg" />
    <a href="#" onClick="myclosefunction();">Close</a>
    </contentTemplate>
        </telerik:RadWindow>

    Above I have shown a sample of creating a splash window which should be shown when the page is load. I have removed all the skins embedded with it.

    I have used ' VisibleOnPageLoad="true" ' to show it on the page load.
    Well up to this, it is okay.,

    My problem is I don't have any idea to close this window.  I am using an hyperlink which has a close funtion. I don't know what to write on the onClick function.

    Could any one give me an exact example to do this? I want to change entire window to show it like a splash screen.

    Thanks
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 05 May 2010 Link to this post

    Hello Hasan,

    Try the following approach in order to achieve the functionality.

    ASPX:

     
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server">  
        <Windows>  
            <telerik:RadWindow ID="Win1" VisibleOnPageLoad="true" runat="server" VisibleStatusbar="false"  
                Animation="Fade" ShowContentDuringLoad="false" VisibleTitlebar="false" Behaviors="None"  
                Modal="false">  
                <ContentTemplate>  
                    <img src="../Images/Refresh.gif" />  
                    <href="#" onclick="myclosefunction();">Close</a>  
                </ContentTemplate>  
            </telerik:RadWindow>  
        </Windows>  
    </telerik:RadWindowManager> 

    JavaScript:

     
    <script type="text/javascript">  
        function myclosefunction() {  
            var oManager = GetRadWindowManager();  
            var oWnd = oManager.getWindowByName("Win1");  
            oWnd.close();  
        }  
        function GetRadWindow() {  
            var oWindow = null;  
            if (window.radWindow)  
                oWindow = window.radWindow;  
            else if (window.frameElement.radWindow)  
                oWindow = window.frameElement.radWindow;  
            return oWindow;  
        }  
    </script> 

    -Shinu.

  3. Hassan Yasir
    Hassan Yasir avatar
    11 posts
    Member since:
    Apr 2010

    Posted 05 May 2010 Link to this post

    It is working! Thanks alot Shinu.
Back to Top