page always in window

3 posts, 0 answers
  1. kmv
    kmv avatar
    53 posts
    Member since:
    Apr 2008

    Posted 27 Aug 2009 Link to this post



    i have a set of pages in my app that i only want to be allowed to be accessed inside a radwindow , whats the best server and or client side way of limiting a page to a radwindow display


    thanks
    kevin
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 28 Aug 2009 Link to this post

    Hello Kevin,

    Checkout the following documentation which describes about several functions that let you open a RadWindow object from your client-side javascript:
    Opening Windows

    Also checkout the documentation on Setting Server-Side Properties of RadWindow

    If you want to restrict the page (if it is not in RadWindow), then you could check for the frameElement of window and redirect/close the window accordingly.
    JavaScript:
     
    <script type="text/javascript"
    function pageLoad() 
        if (window.frameElement == null
        { 
            alert('Not Opened in radwindow'); 
            window.top.location.href = "http://www.google.com"
            //  window.close(); 
        } 
        else 
        { 
            alert('Opened in radwindow'); 
        } 
    </script> 

    -Shinu.
  3. kmv
    kmv avatar
    53 posts
    Member since:
    Apr 2008

    Posted 28 Aug 2009 Link to this post

    thanks shinu

    my question wasnt very well worded.. yes i am trying to ENSURE my web page is always in a radwindow

    your java script example does that but of course the page has to show up fist before navigating away to some other page when not in a radwindow

    i just wonder if there is a better way that doesnt involve the page actually displaying , i cant see anything server side i could use in a page_load



    thanks
    kevin
Back to Top