marecdianor
New Member
I've attempted so many variations of the assignment, Im tired and broken- below is the xml as well as the .js. My goal is to get user input via text and assign that value to the value of the corresponding node in the xml doc\[code\]<employee> <user>Michael McGraw</user> <password>password</password> <date></date> <in></in> <out></out></employee><script type="text/javascript">if (window.XMLHttpRequest){ xmlhttp=new XMLHttpRequest();}else{xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}xmlhttp.open("POST","userPass.xml",false);xmlhttp.send();xmlDoc=xmlhttp.responseXML;$(document).ready(function(){//when the page is ready. . . $('#datepicker').datepicker();//jquery ui datepicker, **this is the value Im working with$('#timeIn').timepicker({ 'scrollDefaultNow': true });//jquery ui plug $('#timeOut').timepicker({ 'scrollDefaultNow': true });$('#submit').on('click',function(event){//when user clicks submit do this. . . var timeIn = (document.getElementById("timeIn").value); var timeOut = (document.getElementById("timeOut").value); var aDate = (document.getElementById("datepicker").value); xDate = xmlDoc.getElementsByTagName("date"); xDate.nodeValue = http://stackoverflow.com/questions/12417450/aDate;////assign the value of datepicker=<date> alert(xDate.nodeValue);//please \[/code\]