Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
40
WebImageViewer javascript error for IE8 with compatibility turned off.
posted

Problem:  Get javascript error upon using an instance of the WebImageViewer Infragistics control with IE 8 browser and compatibility turned off.

Browser:  Internet Explorer 8 with compatibility turned off; if I turn compatibility on, I get no javascript error.

Infragistics Version:  10.3

Description:

Upon using the VisualStudio 2008 debugger, I am finding a javascript error (the 'contentArea' varaible  is set to null upon trying to get its offsetWidth) on the final line of the following Infragistics javascript code (taken from an instance of ScriptResource.axd).  The javascript code seems to be part of Infragistics' implementation for the WebImageViewer control.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

__isVisible:

function(element) {

 

if  (!element) 

     element = this._element;

 

 

var contentArea = null;

 

 

try {

    contentArea = element.offsetParent;

}

 

 

 

catch

(ex) { };

 

 

if (contentArea == null)

/* SJZ - In firefox, if the element's display is none, then it does not have an OffsetParent*/

 

 

 

return false;

 

 

while (contentArea != null && contentArea.offsetWidth <= element.offsetWidth && contentArea.tagName != "DIV")

   /* AS Only if the contentArea is not DIV */

   contentArea = contentArea.offsetParent;

 

 

 

if (this._control.get_orientation() == $IG.Orientation.Horizontal) {

 

 

  var  visibleAreaWidth = contentArea.offsetWidth;