Try this: $("iframe")[0].contentDocument.body.innerHTML = "HELLO"
Jörn On Thu, Jan 8, 2009 at 5:41 PM, m.ugues <m.ug...@gmail.com> wrote: > > Hallo all. > I would like to set the html content of on iframe via jquery, > > I have a page where is defined the iframe: > ....... > <body> > <iframe id="operativita" height="500" width="100"/> > <div id="myDiv" class="block"></div> > </body> > > and via jquery I set the html like this: > > jQuery('#operativita').html('foo'); > jQuery('#myDiv').html('foo'); > > It works with the div but not with the iframe. > I tried several ways (e.g jQuery > ('#operativita').contentDocument.innerHTML = "foo"); but none of them > work. > > Any idea? > > Kind regards > > Massimo >