Platinum Partner

Write List As XML To HTML Form - Javascript

Suppose that you have a draggable list as described at http://tool-man.org/examples/sorting.html. To send that list from a form, do


function listToXml(){
	var vList = document.getElementById('phonetic');
        var vLen  = vList.childNodes.length;
	var vXml  = "
    "; for(var i = 0; i < vLen - 1; i++){ if(vList.childNodes[i].innerHTML){ vXml = vXml + '
  • ' + vList.childNodes[i].innerHTML + '
  • '; } } vXml = vXml + '
'; document.myform.listfield.value = vXml; } ...
  • alpha
  • bravo
  • charlie
  • delta
  • echo
  • foxtrot
{{ tag }}, {{tag}},

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}
{{ parent.authors[0].realName || parent.author}}

{{ parent.authors[0].tagline || parent.tagline }}

{{ parent.views }} ViewsClicks
Tweet

{{parent.nComments}}