jquerymobile-splitview icon indicating copy to clipboard operation
jquerymobile-splitview copied to clipboard

Demo crashes on IE8 and IE9

Open ghost opened this issue 13 years ago • 2 comments

The page renders blank. Here is the javascript error message in IE8 on Win7: Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET CLR 1.1.4322; InfoPath.2; MS-RTC LM 8; .NET4.0C; .NET4.0E) Timestamp: Wed, 31 Oct 2012 18:09:57 UTC Message: 'body' is null or not an object Line: 9221 Char: 7 Code: 0 URI: file:///path/to/splitview/jquery-1.7.1.js

In IE9, the error is: SCRIPT5007: Unable to get value of the property 'scrollWidth': object is null or undefined jquery-1.7.1.js, line 9221 character 7

ghost avatar Oct 31 '12 20:10 ghost

A couple of quick Google searches on these yielded potential answers. I don't believe either are specifically related to Splitview, but might require that the demo be modified.

  1. http://forum.jquery.com/topic/jquery-document-body-is-null-or-is-not-an-object
  2. http://stackoverflow.com/questions/5787245/ie9-javascript-error-script5007-unable-to-get-value-of-the-property-ui-obje

In my experience, Spliview and jQuery Mobile in general aren't at their best on IEanything.

jkrehm avatar Oct 31 '12 21:10 jkrehm

Thanks, I'm new to javascript and web development, so didn't know what to blame. I got it working by including the scripts inside the body tag instead of the header, as in the 2nd answer in http://stackoverflow.com/questions/1603810/how-to-fix-a-document-body-is-null-error

Thanks for replying and keep up the good work!

ghost avatar Oct 31 '12 22:10 ghost