This project is read-only.

JQuery Offset Width Error

Topics: General, Writing modules
Apr 17, 2012 at 8:40 AM


I am getting jquery error in IE 9 while using below code in my Orchard Module.It is working in Firefox and Chrome but not in IE 8/9.

This issue is not happening in normal application.This Occurs only in my Orchard Module.












Microsoft JScript runtime error: Unable to get value of the property 'offsetWidth': object is null or undefined

in "jquery-1.7.1.js" line number 3164. --- > when i debbugged, it says is undefined and Also this error always occurs when a jquery focus method calls.



This same error occurs when i am trying to use JQuery AutoComplete Plugin for a TextBox.

I am  not using focus method explicitly,But it calls internally inside JQuery Dialog and AutoComplete plugin.

So it throws "offset width" error while setting focus to an element.


Please help me to solve this.



Apr 17, 2012 at 4:00 PM
Edited Apr 17, 2012 at 4:01 PM


I found the issue.

I have a DOJO Toolkit (Javascript Api) Grid Control in my Orchard Module.This causes the JQuery Dialog error.

If i removed that Grid from my page,Then Jquery dialog works fine.Otherwise not.

But still i am not able to fix the issue.I want to use both Jquery plugin and Dojo plugin in my Orchard Module.

This issue happens only in IE Browser.

If anybody knows this issue,please give me a solution.



Apr 17, 2012 at 11:58 PM

Dojo, that's a name I haven't heard in a few years. It's generally not a very good idea to mix JS frameworks. I'd look for an equivalent jQuery plug-in.

Apr 18, 2012 at 8:11 AM
Edited Apr 18, 2012 at 8:11 AM

I am using ArcGIS JavaScript Map Viewer (ESRI Javascript Api) in my Orchard Module.That ArcGIS Javascript Map Viewer is built using the Dojo Api.So,that is why i used Dojo for UI's like Custom Widget.

Also i need an AutoComplete Textbox which is not in Dojo,so i used Jquery to serve that purpose.

Apr 18, 2012 at 6:53 PM

Well, if you need Dojo, use only Dojo and use their autocomplete. Don't mix them.