hi telerik
i want to my page knows that opened in rad window (radwindow is its container) or opening outside by typing url?
In other words i want to users cannot open pages instantly (prevent open outside of ranwindow)
and be forced to view only via radwindow .
is it possible?
i want to my page knows that opened in rad window (radwindow is its container) or opening outside by typing url?
In other words i want to users cannot open pages instantly (prevent open outside of ranwindow)
and be forced to view only via radwindow .
is it possible?
4 Answers, 1 is accepted
0
Hi Š•hsan,
You can check if the content page is opened in an IFRAME (RadWindow is basically an IFRAME) and if not - to change the Url to the main page of the site (or wherever you want to transfer the user).
e.g.
Regards,
Georgi Tunev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
You can check if the content page is opened in an IFRAME (RadWindow is basically an IFRAME) and if not - to change the Url to the main page of the site (or wherever you want to transfer the user).
e.g.
<body onload="checkIfInRadWindow()"> |
<form id="form1" runat="server"> |
<script type="text/javascript"> |
function checkIfInRadWindow() |
{ |
if (!window.frameElement) |
{ |
alert("This page is not opened in RadWindow.\n You will be returned to the main page"); |
window.location.href = "Default.aspx"; |
} |
} |
</script> |
Dialog page |
</form> |
</body> |
Regards,
Georgi Tunev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Hi Ehsan,
Just a quick followup - you could also check the solution suggested by Petya here.
Regards,
Georgi Tunev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Just a quick followup - you could also check the solution suggested by Petya here.
Regards,
Georgi Tunev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
ehsan
Top achievements
Rank 1
answered on 22 Jul 2009, 02:56 AM
thank u Georgi
ur answer solved my problem ;) ,
but do u know way to check it in code behind?(not with client side script)
ur answer solved my problem ;) ,
but do u know way to check it in code behind?(not with client side script)
0
Accepted
Hello Ehsan,
This check cannot be done directly on the server - it can be executed on the client only. If you want to get the result on the server after that, you should use __doPostBack() or ajaxRequest() or some other way to post the information to the server.
Best wishes,
Georgi Tunev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
This check cannot be done directly on the server - it can be executed on the client only. If you want to get the result on the server after that, you should use __doPostBack() or ajaxRequest() or some other way to post the information to the server.
Best wishes,
Georgi Tunev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.