tags:

views:

21

answers:

1
iframe.load(function(){alert("1")}); 

not working in ie6 why?

A: 

The DOM has to be ready to bind a handler to the load Javascript event of an element with .load(), and you have to select the element:

$(function() {
    $("iframe").load(function() {
        alert("1");
    });
});​

jsFiddle

Peter Ajtai