I've seen this before, it seems the 'ready' doesn't fire on opened windows or frames, you have to use $(pop).load(fn) instead.
On Jan 16, 1:11 pm, graphicsxp <graphic...@googlemail.com> wrote: > Hello, > > I'm trying to set the html content of a DIV (id='list') which sits in > a page opened with window.open : > > var pop = window.open("PrintList.aspx"); > $(pop.document).ready(function() { > $("#list", pop.document).html("hello"); > }); > > As you can see, the string 'hello' should be written to the DIV once > the page is loaded. Yet the first time I execute this script the > string is never written. If I close the new window and I execute the > script again, it will work. It's only the first time I execute it.... > how weird.. > > Does anyone know why ? > > Thanks