Iframes and jQuery - Working with an iframe's parent
As I stated in my last post about iframe's and jQuery , the load event was only fired once in Internet Explorer, so this may be a problem in some situations (for instance, when you go to a new page in the iframe (which is the only reason I can think of for using one instead of includes)). You can put the code into the iframe and work with the page that contains it instead. This actually may be more desirable as it is simpler and works in more browsers (Firefox, Internet Explorer, Opera 8.54+ tested) $( function() { var p = parent; $("a").click( function() { p.$("#myinput").val("Anchor clicked: " + this.href); return false; }) })