You left two things out of your gadget.

1. The first line of the xml file must be

<?xml version="1.0" encoding="UTF-8" ?>



2. You forgot the opening <![CDATA[  and closing   ]]>

So it should look like

<?xml version="1.0" encoding="UTF-8" ?>

<Module>

<ModulePrefs title="My Test Gadget" title_url="http://
www.geturl.co.uk" description="My test gadget"
render_inline="optional" author="ADS"
author_email="[EMAIL PROTECTED]" author_affiliation="None"
author_location="UK" screenshot="http://www.geturl.co.uk/";
thumbnail="http://www.geturl.co.uk/"; category="test" height="250">
<Require feature="setprefs"/>
<Require feature="tabs"/>
</ModulePrefs>
<UserPref name="selectedTab" datatype="hidden"/>
<UserPref name="name" display_name="Enter Name"/>

<Content type="html">

  <![CDATA[


<script type="text/javascript">
var prefs = new _IG_Prefs();

function content_default() {
var htmlcontent = 'Enter Name: <input type="text" name="name"
id="name" /> <input type="button" name="save" value="save"
onclick="set_region(document.getElementById(\'name\').value);" />';
return htmlcontent;
}

function content_display(tab, prefName) {
var htmlcontent = '';
_IG_FetchContent('http://www.dorman-smith.com/geturl/test_gadget.php?
tab='+tab+'&name='+prefName+'', function (responseText) {
htmlcontent = responseText;
});

return htmlcontent;
}
//---------------------------------
function set_region(value) {
prefs.set("name", value);
var prefName = value;
create_tabs(prefName);
}
//---------------------------------
function init() {
var prefName = prefs.getString("name");

if (prefName.length > 2) {
create_tabs(prefName)
} else {
_gel('content_div').innerHTML = content_default();
}

}

//-----------------------
function create_tabs(prefName) {

_gel('content_div').innerHTML = '';

// Initialize tabs, and set the default
var tabs = new gadgets.TabSet(__MODULE_ID__, "First Tab");


var one_Id = tabs.addTab("First Tab");
document.getElementById(one_Id).innerHTML = content_display('first',
prefName);
var two_Id = tabs.addTab("Second Tab");
document.getElementById(two_Id).innerHTML =content_display('second',
prefName);
var three_Id = tabs.addTab("Third Tab");
document.getElementById(three_Id).innerHTML = content_display('third',
prefName);


}
//---------------------------------


_IG_RegisterOnloadHandler(init);


</script>
<div id="content_div">Loading...</div>


  ]]>


</Content>
</Module>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to