This is a migrated thread and some comments may be shown as answers.

page always in window

2 Answers 39 Views
Window
This is a migrated thread and some comments may be shown as answers.
kmv
Top achievements
Rank 1
kmv asked on 27 Aug 2009, 02:57 PM


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 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 28 Aug 2009, 09:35 AM
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.
0
kmv
Top achievements
Rank 1
answered on 28 Aug 2009, 02:31 PM
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
Tags
Window
Asked by
kmv
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
kmv
Top achievements
Rank 1
Share this question
or