IE error with javascript that works fine on Firefox and Chrome?

As I mentioned in a comment above, the code is fine; there's no need for a meta tag. I suspect there is some other JavaScript error occurring before the code executes. It's either that, or the elements don't exist in the document when the code executes.

Up vote 0 down vote favorite share g+ share fb share tw.

Document. GetElementById("displayImage"). GetElementsByTagName("img")0.

Src = "image2. Png" I seem to remember that for IE, you need to add a tag of some description, but I can't find which one. If it helps: Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .

NET CLR 2.0.50727; . NET CLR 1.1.4322; . NET CLR 3.5.30729; .

NET CLR 3.0.30729) Timestamp: Tue, 6 Sep 2011 12:23:00 UTC Message: Object doesn't support this property or method javascript internet-explorer link|improve this question edited Sep 6 '11 at 12:34pimvdb35.3k52357 asked Sep 6 '11 at 12:32jdborg5358 85% accept rate.

– Walialu Sep 6 '11 at 12:41 1 try debugging with the IE developer tools. The error might not really lie where the error console tells you it does. – Vahur Roosimaa Sep 6 '11 at 12:45 "> – jdborg Sep 6 '11 at 13:03 There's no need for a meta tag for this; the script should work in IE.

Without the HTML document, we're shooting in the dark. – Jeremy Sep 6 '11 at 13:06 Have you tried document. GetElementById("case").

Src = "image2. Png"? – MrMisterMan Sep 6 '11 at 13:07.

Jsfiddle.net/jdb1991/SwkT2 – jdborg Sep 6 '11 at 13:22 And I've tried without the AJAX, same issue – jdborg Sep 6 '11 at 13:26 Ah sorted it! It was window.history. PushState – jdborg Sep 6 '11 at 13:32 Yep, I was just about to post that.

IE8 doesn't support pushState. – Jeremy Sep 6 '11 at 13:34 Do you know any work arounds for IE8? I've added an if loop for now.

– jdborg Sep 6 '11 at 13:37.

Try setting the src attribute for the image like this var image = document. GetElementById("displayImage"). GetElementsByTagName("img")0; image.

SetAttribute("src",path).

I guess setAttribute might not work for IE7 :) – Walialu Sep 6 '11 at 12:38 Doesn't work either – jdborg Sep 6 '11 at 12:39.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions