Navigate Opened Window Using Javascript

2 posts, 0 answers
  1. Gourangi
    Gourangi avatar
    83 posts
    Member since:
    Mar 2008

    Posted 09 Feb 2010 Link to this post

    Hi,

    I want to Navigate Opened Window Using Javascript!

    How can I do that?

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

    Posted 10 Feb 2010 Link to this post

    Hello Divyesh Chapaneri,

    If you want to set/change the url of opened window, then use the following code.

    aspx:
     
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server"
        <Windows> 
            <telerik:RadWindow ID="RadWindow1" OpenerElementID="Button2" runat="server"
            </telerik:RadWindow> 
        </Windows> 
    </telerik:RadWindowManager> 
    <input id="Button2" type="button" value="open window" /> 
    <br /> 
    <input id="Button1" type="button" value="set url - google" onclick="url1();" /> 
    <br /> 
    <input id="Button3" type="button" value="set url - telerik" onclick="url2();" /> 

    javascript:
     
    <script type="text/javascript"
        function url1() { 
            var oManager = GetRadWindowManager(); 
            //Get an existing window DialogWindow using getWindowByName 
            var oWnd = oManager.getWindowByName("RadWindow1"); 
            oWnd.setUrl("http://www.google.com"); 
        } 
        function url2() { 
            var oManager = GetRadWindowManager(); 
            var oWnd = oManager.getWindowByName("RadWindow1"); 
            oWnd.setUrl("http://www.telerik.com"); 
        } 
    </script> 

    -Shinu.
Back to Top