Birthday Gifts Wall gadget screenshot
Check a live demo of the Birthday Gifts Wall gadget here
1) Google Gadget Editor's reopening xml issue
I was editing some codes in the Google Gadget Editor and then click on the Save option to save the modifications. But then i changed to another tab in my igoogle homepage. After which i returned to the tab containing the Google Gadget Editor. But when i reopened the Birthday Gifts Wall gadget source, hopefully i noticed that the source prior to the modifications that i just made was loaded instead of the recently saved version containing my modifications. This is very irritating specially if you thought you opened the latest version and continue to do more modifs and then click on Save again to finally find that you have lost the previous modifications. That's why when reopening any file in the Google Gadget Editor, i always open the file twice coz on the second attempt it always load the latest updated version. For your information, i use firefox to edit my codes coz in safari (including google chrome) it just wont load any file and in IE6 (ya am still with version6) it seems to freeze a bit when loading a gadget source.
2) Use <center> tag rather than CSS for centering gadget's content
At first i was trying to center the Birthday Gifts Wall content using CSS but in vain. Fortunately, i remembered the <center> tag that i was using long ago. And it works.
3) Dont edit uploaded HTML file in Google Gadget Editor
You can upload an HTML file which you may require for your gadget. But beware not to edit your HTML file in the Google Gadget Editor coz when you do a Save it will save it as an XML file instead and as a result will not show up in your browser as expected. Always edit the HTML file on your pc then reupload the file again.
4) Popup Window calling window.opener functions
If you have installed the Birthday Gifts Wall gadget, you will notice that a Popup window is shown when displaying an offered Birthday Gift image or when offering a gift. At first i uploaded an HTML file which was opened by the window.open function. For showing an offered gift this was working fine. But the problem came when i had to do the add gift part where i needed to call a javascript function defined in the caller window ie. the window containing the gadget. To call the javascript function, you use the window.opener.functiontobecalled in the HTML file. But the problem was that this can only works if both window have the same domain. Which was the the case coz the domain for my google homepage is "www.google.com" and that of the uploaded HTML file was "hosting.gmodules.com". So i finally have to do the document.write method to write directly into an empty popup window.
5) Use _IG_GetImageUrl instead of _IG_GetImage
Use the function _IG_GetImageUrl instead of _IG_GetImage coz the function _IG_GetImage is not yet implemented for the framework used to add gadget to the web or inside the Blogger widget. _IG_GetImage seems to be implemented only in the iGoogle framework. It was a real pain to debug this problem.
Happy Google Gadget Programming
Hope that these few tips above can be of some help to Google Gadget developers. Just stay tuned for some more gadgets to come.