Hi,
I want to open a popup window to print some of the gadget's content.
When I test my print function directly from an html page it works just
fine, but when I try calling it from the igoogle gadget it just opens
a blank window. What can be the problem? Is there a way to solve it?
Thanks,
Shai
The code I'm using:
function printList() {
top.wRef=window.open('','printWindow',
'width=500,height=450'
+',menubar=1'
+',toolbar=0'
+',status=1'
+',scrollbars=1'
+',resizable=1')
top.wRef.document.writeln(
'<html><head><title>Shopping List. For printing, choose File |
Print</title></head>'
+'<body bgcolor=white onLoad="self.focus()">'
+'<center><font color=red><b><i>For printing, <a href=#
onclick="window.print();return false;">click here</a> or choose File |
Print</i></b></font>'
+'<H3>Shopping List - ' + currGroup + ' </H3></center>'
+ '<ul>'
)
buf='';
for (j=0;j<items.length;j++) {
buf += "<li>" + items[j];
}
top.wRef.document.writeln(buf+'</ul></body></html>')
top.wRef.document.close()
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"iGoogle Developer Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Gadgets-API?hl=en
-~----------~----~----~----~------~----~------~--~---