On Sat, 19 Apr 2008 14:58:30 -0700 (PDT), fllados wrote: > I had to make the same for DIV's and the solution I've got was: > > 1) Use window.open (var w = > window.open('','name','width=X,height=Y'); > 2) Copy the html to the new window ( w.document.write($(N).html()); > w.document.close(); ) > 3) The onload for the body tag should say something like "print(); > self.close();" > > Hope this helps you
Thanks Fer, I see where your going, but I'm pretty new to jQuery and I'm not quite sure how to get there. In my test case, I am working with the Greybox version of Lightbox and I have added a PRINT link to the title bar. I catch the click event for the link and I am now in a printthis function (added to the greybox code). function printthis() { ... we are here } The HTML page that I need to print is currently loaded into a iFrame that was created when the Greybox opened. The jQ code that creates the iFrame is this: $("#GB_window").append("<iframe id='GB_frame' src='"+url+"'></iframe>"); So your saying that I need to create a new window at the size of the iFrame, copy the contents of the iFrame into it AND modify the body statement of the new document to have a print();self.close(); statement. Is that right? It seems like we are right back to where we are with the iFrame that is already loaded. Like I said I am new to jQuery and may be missing the obvious here, but I'm lost as to how to do what your saying (from the already open Greybox) and also of how to modify the body onload statement of the new document. Sorry if I seem dense on this. Chuck