$("#ifram").attr("src","url"); $("#ifram").load( function() { $("#ifram")[0].contentWindow.function(p1, p2); } );