Categories | Question details Back To List | ||
this is my option values(selecting from the radio button) this is my option values(selecting from the radio button) function checkedAll(value) { //location.reload(); for ( var i=0;i<document.frmTourPackage.check.length;i++) { if(document.frmTourPackage.check[i].checked ) { flag1 = 'hotel'; var hotelvalue = document.frmTourPackage.check[i].value; hval = hotelvalue; //alert('flag1'+flag1); // alert('hotelvalue '+hval); var url = '<%=appPath%>/generateXMLTSPinsert.do?mode=hotelvalue&tournum='+document.forms[0].tourid.value+'&tourdate='+document.forms[0].tourdate.value+'&tourcode='+document.forms[0].tourcode.value+'&hotelvalue='+hval ; if (window.XMLHttpRequest) { req = new XMLHttpRequest(); } else if(window.ActiveXObject) { req = new ActiveXObject('Microsoft.XMLHTTP'); } req.open('POST', url,false); // req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); req.onreadystatechange = callbk; req.send('tournum='+document.forms[0].tourid.value+'&tourdate='+document.forms[0].tourdate.value+'&tourcode='+document.forms[0].tourcode.value+'&hotelvalue='+hval); //req.send(null); displayGrid2(hval); } } } this to callback thefunctionto display the radilo value in the table (inside one td) function callbk() { //alert('incall back function'); if (req.readyState == 4) { if(req.status == 200) { var temp = req.responseXML.getElementsByTagName('templateData')[0]; var strclasname = temp.getElementsByTagName('strclassname')[0].firstChild.data; var strvendname = temp.getElementsByTagName('strvendorname')[0].firstChild.data; strclasname=strclasname=='-'?'':strclasname; // alert('streclaname'+strclasname); strvendname=strvendname=='-'?'':strvendname; // alert('strvendorname'+strvendname); var results= strclasname + '- ' +strvendname ;//alert('results'+results); document.getElementById('strname').innerHTML = ' Rooming List for hotelvalue : ' + results ; //filterNum(results); } } } this to display the grid (depends upon the radio value) function displayGrid2(hval) { tournum = document.forms[0].tourid.value; tourcode = document.forms[0].tourcode.value; tourdate = document.forms[0].tourdate.value; //hotelvalue=hval; var url = '<%=appPath%>/generateXMLTSPHotel.do'; if (window.XMLHttpRequest) { req = new XMLHttpRequest(); } else if(window.ActiveXObject) { req = new ActiveXObject('Microsoft.XMLHTTP'); } req.open('POST', url,false); req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); req.onreadystatechange = callback2; req.send('tournum='+document.forms[0].tourid.value+'&tourdate='+document.forms[0].tourdate.value+'&tourcode='+document.forms[0].tourcode.value+'&hotelvalue='+hval); } function callback2() { if (req.readyState == 4) { if (req.status == 200) { mygrid2.clearAll(false); mygrid2.loadXML('<%=appPath%>/tsp/xml/gridpal3.xml'); mygrid.clearAll(false); mygrid.loadXML('<%=appPath%>/tsp/xml/gridpal.xml'); } } } Problem is if select radio continuously grid value is not changing or refresing continuously. if there is no value for particular radio means(selecting query depends upon the radio(vendorid) , last selected radio's values in the grid itself displaying. Please suggest me to refresh or to delete the xml file and to recreate the file depends upon the option selected from the radio button. (checked by giving destructor method) no use. Expecting reply @ the earliest Answer posted by Support on Mar 10, 2008 07:42 >>Please suggest me to refresh or to delete the xml file and to recreate the file depends upon the option selected from the radio button. (checked by giving destructor method) no use. Basically the best approach is to use some kind of server side script instead of static XML file Such server side script may generate necessary XML contents based on current environment ( radio button states or some other params ) |