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

4 posts, 1 answers
  1. Darren
    Darren avatar
    36 posts
    Member since:
    Jan 2008

    Posted 03 Nov 2008 Link to this post

    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.

  2. Serrin
    Serrin avatar
    286 posts
    Member since:
    Sep 2008

    Posted 03 Nov 2008 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Answer
    Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 04 Nov 2008 Link to this post

    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.
  5. Darren
    Darren avatar
    36 posts
    Member since:
    Jan 2008

    Posted 04 Nov 2008 Link to this post

    Thank you guys.

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

    Darren
Back to Top