Hi Shai, I think it would be easier for other developers to review this with the full gadgets. I am usually more successful doing runtime debugging than static analysis on plain text Javascript code. :-)
If you can post here the URL if your gadget, you will most likely have a few developers taking a peak at it. If you want to make it even easier for other developers, posts the gmodule.com full URL such as we can just click on it and watch what's happening in the debugger. Have you tried to debug what's happening in your printList() function already? Is the writeln() call successful? Jerome On Mar 13, 5:37 pm, shai <[email protected]> wrote: > 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 -~----------~----~----~----~------~----~------~--~---
