I am trying to use GGE ( 
http://code.google.com/apis/gadgets/docs/legacy/gs.html#GGE
) in the google wave gadgets tutorial ( 
http://code.google.com/apis/wave/extensions/gadgets/guide.html
). I am using the Shared State gadget example and the Preview tab
shows the two buttons although it does not show any increment. When I
save and actually click on file I get this error, "XML Parsing Error:
not well-formed
Location: 
http://hosting.gmodules.com/ig/gadgets/file/112654190602855268960/like.xml
Line Number 1, Column 13:<?xmlversion="1.0" encoding="UTF-8" ?>
------------^"

This is code i am using:
<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="State Example" height="120">
  <Require feature="wave" />
</ModulePrefs>
<Content type="html">
<![CDATA[
<div id="content_div" style="height: 50px;"></div>
    <script type="text/javascript">

    var div = document.getElementById('content_div');

    function buttonClicked() {
      var value = parseInt(wave.getState().get('count', '0'));
      wave.getState().submitDelta({'count': value + 1});
    }

    function stateUpdated() {
      if(!wave.getState().get('count')) {
        div.innerHTML = "The count is 0."
      }
      else {
        div.innerHTML = "The count is " + wave.getState().get
('count');
      }
    }

    function init() {
      if (wave && wave.isInWaveContainer()) {
        wave.setStateCallback(stateUpdated);
      }
    }
    gadgets.util.registerOnLoadHandler(init);

    // Reset value of "count" to 0
    function resetCounter(){
      wave.getState().submitDelta({'count': '0'});
    }

    </script>
    <input type=button value="Click Me!" id="butCount"
onClick="buttonClicked()">
    <input type=button value="Reset" id="butReset"
onClick="resetCounter()">
  ]]>
  </Content>
</Module>


Thanks for the help

--

You received this message because you are subscribed to the Google Groups 
"Google Wave API" group.
To post to this group, send email to google-wave-...@googlegroups.com.
To unsubscribe from this group, send email to 
google-wave-api+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-wave-api?hl=.


Reply via email to