<ul id="cookielist">
<li py:for="cookie in cookies"
py:content="cookie"
id="c_${cookie}">Cookie Name Here</li>
</ul>
<script type="text/javascript">
function update_server()
{ var children = $("cookielist").childNodes;
var cookies = new Array(children.length);
for (var i =0; i<children.length; i++){
cookies[i] =
children[i].firstChild.nodeValue;
}
jsoncookies = serializeJSON(cookies);
d = loadJSONDoc("saveorder?" +
queryString({cookielist : jsoncookies}));
d.addCallback(update_done);
}
Sortable.create('cookielist',{ "onUpdate":
update_server });
</script>
I get an error from this code its from kevin's effective ajax
presentation
In his example there was no <script before function update_server()
The point where it errors me out is the first javascript for loop
specifically at children.length
Can someone let me know how to do this, do i need to include the
javascript in the head or what. A fix would be very much appreciated.
I'm running firefox and I haven't tried it using mac os x.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" 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/turbogears
-~----------~----~----~----~------~----~------~--~---