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

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

1 Answer 46 Views
Spell
This is a migrated thread and some comments may be shown as answers.
Siddhartha
Top achievements
Rank 1
Siddhartha asked on 25 Jun 2009, 12:52 AM
Hi,

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.

Thanks
-Sid

1 Answer, 1 is accepted

Sort by
0
Siddhartha
Top achievements
Rank 1
answered on 01 Jul 2009, 06:01 PM
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,
Lini
the Telerik team
Tags
Spell
Asked by
Siddhartha
Top achievements
Rank 1
Answers by
Siddhartha
Top achievements
Rank 1
Share this question
or