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

Dialog "close button" from remote website (different domain site)

3 Answers 72 Views
Window
This is a migrated thread and some comments may be shown as answers.
Darren
Top achievements
Rank 1
Darren asked on 03 Nov 2008, 06:56 PM
I created a dialog page. This dialog page will be called from a main page through rad.window. I also add one close button in the dialog page, so user can close the dialog page (the rad.window). The codes for close button are from your document. It works well if the dialog page has the same domain as main page. I copied the dialog page to a remote website (different domain site). And the close button is no longer functional.

I have a testing page to show the difference:
http://dev2.tjc.org/TestingProject/Default.aspx

This page has 2 links which connect to 2 identical pages but hosted on 2 different places. The first link connect to the same domain, in which close button works properly. The second link connect to a remote website, in which close button cannot work.

Can you help me with this issue?

Our environment is: Windows 2008 IIS7, Telerik.RadControls Q3 beta.

3 Answers, 1 is accepted

Sort by
0
Serrin
Top achievements
Rank 1
answered on 03 Nov 2008, 09:44 PM
I think this may have something to do with the fact that you're calling it from another domain...  Essentially, you're hosting an iframe (RadWindow) for xyz.org in a page from abc.com.  If you go through the debug, window.frameElement shows access denied.  My research is showing that javascript doesn't work cross-domain in the way you are trying to use it, as if you could do cross-domain javascript like that you could easily take stabs at grabbing session and other somewhat secure data.
0
Accepted
Georgi Tunev
Telerik team
answered on 04 Nov 2008, 12:46 PM
Hi guys,

Indeed, Serrin is right - the browser will not allow cross-site scripting. If the content page is not in the same domain, the only way to close it is by using the [X] button in the top right corner.



Sincerely yours,
Georgi Tunev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Darren
Top achievements
Rank 1
answered on 04 Nov 2008, 02:15 PM
Thank you guys.

Yes, it is not possible to have cross-domain script. I will use close [x] on top-right corner instead.

Darren
Tags
Window
Asked by
Darren
Top achievements
Rank 1
Answers by
Serrin
Top achievements
Rank 1
Georgi Tunev
Telerik team
Darren
Top achievements
Rank 1
Share this question
or