I'm Working with register module with xmlHttpRequest. I have checking all. When i was trying to redirect after successfull its displaying the response with in the given div. [CODE] <script type="text/javascript"> function showRegister() { 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() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("result").innerHTML=xmlhttp.responseText; } } var fname = document.getElementById("userfname").value; var lname = document.getElementById("userlname").value; var email = document.getElementById("userfemail").value; var pass = document.getElementById("userfpass").value; var gender = document.getElementById("userfgender").value; var umonth = document.getElementById("usermonth").value; var uday = document.getElementById("userday").value; var uyear = document.getElementById("useryear").value; var tc …

Member Avatar
Member Avatar
+0 forum 4

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

Hi, I am running the scripts below which should return a string containing a URL. So far, it cannot find the form contents in Firefox, but displays the non-dynamic data such as [I]?Location=[/I]. It won't work at all in IE. Can any one help? This is the form: [CODE] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script language="javascript" type="text/javascript" src="/js/common.min.js?1266866725"> </script> <script src="calendar.js" type="text/javascript"></script> <script src="calendar1.js" type="text/javascript"></script> <link href="calendar.css" type="text/css" rel="stylesheet" /> <style> #container { background-color:#C60; color:#FFF; font-family:"Trebuchet MS", Arial, Helvetica, sans-serif; padding:15px; } #subtitle { font-style:italic; } </style> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Local Session …

Member Avatar
Member Avatar
+0 forum 1

Hy again! =) Here's my problem. My AJAX doesn't want to work, and Firebug gives me this error message: "uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIXMLHttpRequest.setRequestHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: [url]http://localhost/mysite/js/functions.js[/url] :: callSaveFile :: line 273" data: no]". So as u see I'm using a POST method to send data to a PHP file, but I'm pretty new to POST method... If someone could help me with this would be really fine! =) [CODE] var url="open.php"; var params="filename="+document.getElementById("filename").value; params=params+"&extension="+document.getElementById("extension").value; params=params+"&content="+content; params=params+"&path="+document.getElementById("path").value; xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xmlhttp.setRequestHeader("Content-length", content.length); xmlhttp.setRequestHeader("Connection", "close"); xmlhttp.onreadystatechange=saveStateChanged; xmlhttp.open("POST",url,true); xmlhttp.send(params);[/CODE] Thank you! =)

Member Avatar
Member Avatar
+0 forum 1

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

[CODE=AJAX] function update(value1) { doAjax("behind_scan.php" , "id="+value1); } function doAjax(url , str ) { xmlhttp=GetXmlHttpObject(); if (xmlhttp==null) { alert ("Browser does not support HTTP Request"); return; } url=url+"?"+str; xmlhttp.onreadystatechange=stateChanged; xmlhttp.open("GET",url,true); xmlhttp.send(null); } function stateChanged() { if (xmlhttp.readyState==4) { //document.getElementById("txtHint").innerHTML=xmlhttp.responseText; //alert(xmlhttp.responseText) document.forms.myform.scanner.value = ""; document.forms.myform.scanner.focus(); } } function GetXmlHttpObject() { if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari return new XMLHttpRequest(); } if (window.ActiveXObject) { // code for IE6, IE5 return new ActiveXObject("Microsoft.XMLHTTP"); } return null; } [/CODE] This pages calls a function on a separate php page to run 2 mySQL queries, the value must be put …

Member Avatar
Member Avatar
+0 forum 2

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.