Skip to main content

Posts

Showing posts with the label active x object

PHP Tips-Getting the nodes list of xml doument with responseXml in ajax ,call image save in database,time difference etc

Getting the nodes list of xml doument with responseXml in ajax var obj = ""; function callAjaxObj() { try { obj = new XMLHttpRequest(); } catch(e) { try { obj = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try { obj = ActiveXObject("Microsoft.XMLHTTP"); } catch(e) { alert("your browser doesn't support ajax"); return false; } } } } function testResponseXml() { callAjaxObj(); obj.open("get","sample.xml",true); obj.onreadystatechange=function() { if(obj.readyState==4) { var doc = obj.responseXML.documentElement; //var doc = obj.responseXML; alert(doc.getElementsByTagName('user').length); } } obj.send(null); } Example of calender script in PHP calender script in PHP echo " $title $year "; echo "SMTWTFS"; $day_count = 1; echo ""; while (