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! =)
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);
Thank you! =)