Dear Friends, Am trying to builing a social networking site that user can post his update on profile text bat. Once we click on the share button the text field value will pass to the function of xmlHTTP request, but here is not passing a value. Please help me. I am posting my code here <script type="text/javascript"> function update() { var str = document.getElementById("message").value; if (str.length==0) { document.getElementById("msgupdate").innerHTML=""; return; } if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { while(xmlhttp.readyState<4) { document.getElementById("msgupdate").innerHTML="Wait for a moment"; …

Member Avatar
+0 forum 0

Hello everybody! I have a serious problem with my diploma work! So here it is: My ajax.js file cannot be executed. It does nothing when I click on the buttons... Here's the ajax.js code:4 [CODE] function opensave(type){ url="open.php"; content=replacer("editor"); var xmlhttp=if(window.XMLHttpRequest){ new XMLHttpRequest(); } else if(){ new ActiveXObject("Microsoft.XMLHTTP"); }; xmlhttp.onreadystatechange=stateChanged(); if(type="read"){ xmlhttp.open("GET",url,true); url+="?open=r&filename="+document.getElementById("filename").value+"&extension="+document.getElementById("extension").value; xmlhttp.send(null); } else if(type="write"){ xmlhttp.open("POST",url,true); setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xmlhttp.send("open=w&filename="+document.getElementById("filename").value+"&extension="+document.getElementById("extension").value+"&content="+content); }; function stateChanged(){ if (xmlhttp.readyState==4){ processdata(xmlhttp.responseText); }; }; };//******************************************************************************************** function replacer(id){ str=document.getElementById(id).value.replace(/"/g,"%dquot%"); return str; };//******************************************************************************************** function processdata(response){ response=response.split("<!--//split-->") document.title=response[0]; content=response[1].replace("%dq", /"/q); document.getElementById("editor").innerHTML=content; };//******************************************************************************************** [/CODE] The page which is linked to, doesn't want to "call" it. These methods were implemented …

Member Avatar
Member Avatar
+0 forum 8

I'm a newbie in programming. I spent few hours yesterday and today working on a small AJAX page with multiple combo boxes that are populated from the database. I use IE6 99% of the time and I utilize the excellent . I almost done with the page (I’m pretty proud of it too) so I decided to show it to my work buddy. On both IE8 and opera, my beautiful double combo boxes just failed miserably. A part of what I was doing was to populate a double combo box with dynamic data from the database. I created an empty …

Member Avatar
+0 forum 0

The End.