Task: To create a google gadgets.
Step-1: Create an xml file:
test.xml.
Step-2: Copy and paste the following code to the xml file.
<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="test title" description="test description" author="test author" author_email="nitindhiman@gmail.com" author_link="http://nitindhiman.blospot.com/" title_url="http://nitindhiman.blospot.com/" screenshot="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg98F5SCXygyaV4vUASPtL3niQ0j_Kw4MlWU0njVLaMG0bKTgfBZW1s-sIv6UOrUdZDJbLfU1GvonXBtjPxrax3baGpZ__m-V7e-eJkC0WKzwocRF9dIEgkR2LU-FXrwG24_v68CI0vTAjJ/s220/Image015.jpg" thumbnail="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg98F5SCXygyaV4vUASPtL3niQ0j_Kw4MlWU0njVLaMG0bKTgfBZW1s-sIv6UOrUdZDJbLfU1GvonXBtjPxrax3baGpZ__m-V7e-eJkC0WKzwocRF9dIEgkR2LU-FXrwG24_v68CI0vTAjJ/s220/Image015.jpg" />
<UserPref name="show_date" display_name="Show Dates?" datatype="bool"/>
<UserPref name="show_summ" display_name="Show Summaries?" datatype="bool"/>
<UserPref name="num_entries" display_name="Number:" />
<Content type="html">
<![CDATA[
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
<style type="text/css">
body{font-size: 11px;font-style: normal;font-weight: normal;font-family: Arial,Helvetica,Sans-Serif;text-align: left;color: #206488;background-color: #bafffe;}
body a, a:link, a:hover, a:visited{color: #206488;letter-spacing: 1px;text-decoration: underline;}.cleared{border: medium none;clear: both;float: none;font-size: 1px;margin: 0;padding: 0;}
.saper{float: left;font-size: 0;height: 10px;line-height: 0;width: 100%;}
.tooltip{color:#000;padding: 5px 0;display: none;}
.toollnk{padding: 0 5px;float: left;}
.float-left{float: left;}
</style>
<div class="saper"></div><div id="dv_id" style="overflow:auto;height:200px;width:500px;"><a href="http://www.nitindhiman.blogspot.com">nitin dhiman's blog</a></div>
<script type="text/javascript">$(document).ready(function () {alert('hello external link');});</script>
]]>
</Content>
</Module>
Step-3: Upload the xml file to a web server so that we can browse the file in a browser(IE / FIREFOX / CHROME etc.)
<Module>
<ModulePrefs title="test title" description="test description" author="test author" author_email="nitindhiman@gmail.com" author_link="http://nitindhiman.blospot.com/" title_url="http://nitindhiman.blospot.com/" screenshot="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg98F5SCXygyaV4vUASPtL3niQ0j_Kw4MlWU0njVLaMG0bKTgfBZW1s-sIv6UOrUdZDJbLfU1GvonXBtjPxrax3baGpZ__m-V7e-eJkC0WKzwocRF9dIEgkR2LU-FXrwG24_v68CI0vTAjJ/s220/Image015.jpg" thumbnail="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg98F5SCXygyaV4vUASPtL3niQ0j_Kw4MlWU0njVLaMG0bKTgfBZW1s-sIv6UOrUdZDJbLfU1GvonXBtjPxrax3baGpZ__m-V7e-eJkC0WKzwocRF9dIEgkR2LU-FXrwG24_v68CI0vTAjJ/s220/Image015.jpg" />
<UserPref name="show_date" display_name="Show Dates?" datatype="bool"/>
<UserPref name="show_summ" display_name="Show Summaries?" datatype="bool"/>
<UserPref name="num_entries" display_name="Number:" />
<Content type="html">
<![CDATA[
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
<style type="text/css">
body{font-size: 11px;font-style: normal;font-weight: normal;font-family: Arial,Helvetica,Sans-Serif;text-align: left;color: #206488;background-color: #bafffe;}
body a, a:link, a:hover, a:visited{color: #206488;letter-spacing: 1px;text-decoration: underline;}.cleared{border: medium none;clear: both;float: none;font-size: 1px;margin: 0;padding: 0;}
.saper{float: left;font-size: 0;height: 10px;line-height: 0;width: 100%;}
.tooltip{color:#000;padding: 5px 0;display: none;}
.toollnk{padding: 0 5px;float: left;}
.float-left{float: left;}
</style>
<div class="saper"></div><div id="dv_id" style="overflow:auto;height:200px;width:500px;"><a href="http://www.nitindhiman.blogspot.com">nitin dhiman's blog</a></div>
<script type="text/javascript">$(document).ready(function () {alert('hello external link');});</script>
]]>
</Content>
</Module>
Step-3: Upload the xml file to a web server so that we can browse the file in a browser(IE / FIREFOX / CHROME etc.)
Step-4: Go to following URL to submit google gadget:
http://www.google.com/ig/submit
Step-5: Enter the URL in the textbox and submit your gadget to the google:
Step-6: All done search for your widget and add that to your page.
Thanks,
Nitin Dhiman.