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

Microsoft JScript runtime error: 'null' is null or not an object

2 Answers 111 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Aaron
Top achievements
Rank 1
Aaron asked on 22 Jun 2011, 03:13 PM

We have successfully used several Rad Controls in our preexisting AJAX enabled project, but are unable to get spell check working on the RadEditor.

When I click on the spell icon I get the following error:

   Microsoft JScript runtime error: 'null' is null or not an object

The debugger shows the error as occurring in the following function:

// Name:        HTMLEditor.EditPanel.debug.js
// Assembly:    AjaxControlToolkit
// Version:     3.5.50508.0
// FileVersion: 3.5.50508
 _invokingRequest: function(sender, args) {
     if (this._contentPrepared) {
         return;
     }
     var webRequest = args.get_webRequest();
     var body = webRequest.get_body();
     // change body here...
     var reg = new RegExp("([\\?&])(" + this.get_contentElement().name + "=)([^&$]*)([&$])", "g");
     this._prepareContentForPostback(this.get_content());
 >>> body = body.replace(reg, "$1$2" + escape(this.get_contentElement().value) + "$4");  <<<- body is null
     this._contentPrepared = true;
     webRequest.set_body(body);
 },

I followed the directions for adding RadControls for ASP.NET AJAX to an existing application found here: http://www.telerik.com/help/aspnet-ajax/introduction-adding-radcontrols-prometheus-existing-application.html … and the recommendations for getting started with the editor here: http://www.telerik.com/help/aspnet-ajax/editor-getting-started.html
It should be noted the documentation specified configuration options in Step 9 which did not exist on the Smart Tag Menu (yes, we have the Telerik.Web.UI.dll in the project’s bin folder). Unable to add from the designer, I followed the directions found here: http://www.telerik.com/help/aspnet-ajax/editor-enable-spellcheck.html and manually added the spell check handler to my web.config, resulting in the editor displaying on the UI with a spell check icon on the toolbar.

I also tried substituting in a RadScriptManger in place of the ASP ScriptManger, but that only led to another problem:

Microsoft JScript runtime error: AjaxControlToolkit requires ASP.NET Ajax 4.0 scripts. Ensure the correct version of the scripts are referenced. If you are using an ASP.NET ScriptManager, switch to the AjaxScriptManager in System.Web.Ajax.dll, or use the ToolkitScriptManager in AjaxControlToolkit.dll.

We are developing in VS 2008. Any help is appreciated.

2 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 24 Jun 2011, 03:48 PM
Hello Aaron,

If you project is running under .NET 4.0 then put in the bin folder the .NET 4.0 versions of Telerik.Web.UI.dll and AjaxControlToolkit.dll. If the used .NET frameworks is 3.5 then use the 3.5 versions of Telerik.Web.UI.dll and AjaxControlToolkit.dll. You can download the latest version of the Ajax Toolkit from the following link:
http://ajaxcontroltoolkit.codeplex.com/releases/view/63654

If you still experience any problems, please isolate them in a simple working project and send it for examination via a support ticket. We will examine the project and provide a solution after reproducing the issues.

Kind regards,
Rumen
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Aaron
Top achievements
Rank 1
answered on 24 Jun 2011, 08:50 PM
I had an Editor control from the AJAX Control Toolkit on the same page. Once I removed it everything worked fine.
Tags
Editor
Asked by
Aaron
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Aaron
Top achievements
Rank 1
Share this question
or