Duh, got it....had quotes around this: mywin.document.body
You may now return to the regular scheduled programming....
- Jack
Jack Killpatrick wrote:
> Hi,
>
> I've got a button I'm adding a click handler to that should open a new
> window (js popup) and then copy the contents of a div on the opener into
> the popup, for a "print friendly view". Seems like this should work, but
> I don't get anything in the new window:
>
> $(document).ready( function() {
> $("#btnPrint").click( function() {
> var mywin = window.open("", "printpop",
> "location=0,status=0,scrollbars=0,width=450,height=500");
> $('#tbl').clone().appendTo( $('mywin.document.body') );
> });
> });
>
> In the opener I have:
>
> <table id="tbl">
> <tr>
> <td>hi here</td>
> </tr>
> </table>
>
> <input id="btnPrint" type=button value="Print Me">
>
> When I viewsource on the popup (in Firefox 2.0) that window.open
> creates, it shows me the basic:
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01
> Transitional//EN"><html><head><title></title></head><body></body></html>
>
> Advice?
>
> Thanks,
> Jack
>
>
>
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
>
>
>
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/