RadSpell control throwing error when domain is set to a secondary (lower) domain

2 posts, 0 answers
  1. Siddhartha
    Siddhartha avatar
    2 posts
    Member since:
    Jun 2009

    Posted 24 Jun 2009 Link to this post


    I am experiencing a strange behavior in RadSpell if the domain is set to a lower domain from a web page. My webpage is in a particular domain (say xx.yy.com). In order to integrate with another application in our organization I am changing the domain from javascript to a lower domain (say yy.com) on load of the page. Strangely the spell checker stops working at this point. I am receiving the following error(alert message) when I click on the spell check link.

    "No radWindow found"

    Upon clicking Ok on the alert box I receive a javascript error which reads "'this.ib' is null or not an object". I tried to debug the error and it appears to be in the SpellCheckDialog.js file at the following line of code.

    this.Ib = this.ib.k();

    Any help will be appreciated.

  2. Siddhartha
    Siddhartha avatar
    2 posts
    Member since:
    Jun 2009

    Posted 01 Jul 2009 Link to this post

    Below is the response from Telerik support team which resolved the problem.

    Hello Siddhartha,

    I think the problem comes from the fact that the RadSpell control uses an IFRAME element to display the spell check dialog. The IFRAME is considered as part of the page. When you set the document domain on the page, the IFRAME ends up with a different domain and the browser refuses to allow script access to/from it. I don't think that it is possible to change the domain of the IFRAME (http://msdn.microsoft.com/en-us/library/ms533028%28VS.85%29.aspx). The only workaround I can give you is to set the  UseClassicDialogs RadSpell property to true. This way the spellchecker will use a normal browser window instead of an IFRAME and you should not see an "access is denied" error any longer.

    <rad:RadSpell ID="RadSpell1" UseClassicDialogs="true" runat="server" ControlToCheck="txt1" />

    Sincerely yours,
    the Telerik team
Back to Top