HTML - Append To Xml
Hey,
I realise this is a topic that's quite well documented online and in other people's posts, but I just haven't been able to quite grasp it from what I've read. I have a fairly simple problem. I want to make a totall bare-bones web page, with a number of input boxes, and a submit button. If I fill them in and press submit, I want that information to go into an XML file that already exists, with stuff already in it, and appends it to the top of the file. I'm pretty new to HTML and ASP, so I need some resource that teaches it simply! Also, my XML file is structured so that there's just one node, and in that node several attributes. Any help or adivce on what I need to do would be great! Similar TutorialsHTML Code: <head> <script type="text/javascript"> function addGroup() { x=document.getElementById("group").getElementsByTagName("p"); groups=document.getElementById("groupName"); var j=0,i=0; if (groups.value=="") { alert('must create one group'); } for (i=0;i<x.length;i++) { if (x[i].innerHTML == groups.value) { alert('the group name is already created'); j==1; } } if (j==0) { x.appendChild(groups); } } </script> </head> <body> <div id="group"> <p>Group03</p> </div> <p><input type="text" id="groupName" size="84" maxlength="84" value=""/></p> <p><input type="button" value="create" onclick="addGroup()" /></p> </body> I am trying to do simple HTML that read a group from a input box and append the new group to the group section under id="group" but the appendChild does not seems to work, any clue on how to make it works? an affiliate of mine said i have to append a link with a number, just wondering how to do that? Thanks for reding |