I get an error (Object doesn't support this property or method) on 56. In Internet Explorer and I would like to try to keep it cross browser compatible.


This is the source of the function:

SM.Util.prototype.constructor.Notify = function(txt) {
chat = document.getElementById('chat'); //this is line 56 and chat is a img
notify = document.getElementById('notify');
notify.style.left = leftValue;
notify.style.visibility = "visible";
notify.innerHTML = txt;
setTimeout("SM.Util.Notify.Clear()",5000);
}

Recommended Answers

shoot me down in flames, I could be very wrong
but a while back I think I read on MSDN
notify is a reserved word in the IE DOM,
it may require a name change for that ID

http://msdn.microsoft.com/en-us/library/aa753746(VS.85).aspx

Jump to Post

All 2 Replies

I get an error (Object doesn't support this property or method) on 56. In Internet Explorer and I would like to try to keep it cross browser compatible.


This is the source of the function:

SM.Util.prototype.constructor.Notify = function(txt) {
chat = document.getElementById('chat'); //this is line 56 and chat is a img
notify = document.getElementById('notify');
notify.style.left = leftValue;
notify.style.visibility = "visible";
notify.innerHTML = txt;
setTimeout("SM.Util.Notify.Clear()",5000);
}

There's nothing wrong with the line you refer to as being 56th; (that is: the one causing the error). Because it can't!
You didn't declare your "chat" variable before using but that's not gona cause errors.

If you are using linked content and scripts on that page, IE will report wrong line of error. Or the correct one but-referring to what document -I don't know.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.