Reputation: 20115
I have an error on my site triggered by Internet Explorer 8 when I first enter the page. The debugger says:
Object doesn't support this property or method
widget, line 48 character 3
I click on the error to take me to the line. It leads me to HTML. How is it possible that HTML triggered a JS error?
I have not clicked this anchor. The error appeared upon page load. Can someone give me leads on where I should be looking to find the real problem?
Live site: http://veetle.com/index.php/widget#3D598BC5A2144C53D2797CF7EDEF083A/true/default
Upvotes: 0
Views: 237
Reputation: 186063
This is probably the source of the issue:
onclick="VEETLE.Players.instance().getPlayer().togglePlayer(); return false"
The reason for the error is probably the VEETLE
object not being defined yet.
Try placing the SCRIPT that defines that object into the HEAD of the page.
Consider this:
var po = document.getElementById('playOverlay');
po.onclick = function() {
VEETLE.Players.instance().getPlayer().togglePlayer();
return false;
}
... instead of the onclick attribute.
Upvotes: 2