Invent
28-05-2007, 08:39 PM
Hey,
I need some JS help for the myHABBO Homes script.
I have this code:
<script type="text/javascript">
<!--
function save() {
xmlHttp=GetXmlHttpObject() // Creates a new Xmlhttp object.
if (xmlHttp==null){ // If it cannot create a new Xmlhttp object.
alert ("Browser does not support HTTP Request") // Alert Them!
return // Returns.
} // End If.
var sticker_cactus_1_yuh = "lol"
var url="update.php?update=true&"+sticker_cactus_1="+sticker_cactus_1_yuh
xmlHttp.open("GET",url,true) // Opens the URL using GET
xmlHttp.onreadystatechange = function () { // This is the most important piece of the puzzle, if onreadystatechange is equal to 4 than that means the request is done.
if (xmlHttp.readyState == 4) { // If the onreadystatechange is equal to 4 lets show the response text.
document.getElementById("update").innerHTML = xmlHttp.responseText; // Updates the div with the response text from check.php
} // End If.
}; // Close Function
xmlHttp.send(null); // Sends NULL instead of sending data.
} // Close Function.
-->
</script>I have a working xmlHttp function, does anyone know why it's not working?
I need some JS help for the myHABBO Homes script.
I have this code:
<script type="text/javascript">
<!--
function save() {
xmlHttp=GetXmlHttpObject() // Creates a new Xmlhttp object.
if (xmlHttp==null){ // If it cannot create a new Xmlhttp object.
alert ("Browser does not support HTTP Request") // Alert Them!
return // Returns.
} // End If.
var sticker_cactus_1_yuh = "lol"
var url="update.php?update=true&"+sticker_cactus_1="+sticker_cactus_1_yuh
xmlHttp.open("GET",url,true) // Opens the URL using GET
xmlHttp.onreadystatechange = function () { // This is the most important piece of the puzzle, if onreadystatechange is equal to 4 than that means the request is done.
if (xmlHttp.readyState == 4) { // If the onreadystatechange is equal to 4 lets show the response text.
document.getElementById("update").innerHTML = xmlHttp.responseText; // Updates the div with the response text from check.php
} // End If.
}; // Close Function
xmlHttp.send(null); // Sends NULL instead of sending data.
} // Close Function.
-->
</script>I have a working xmlHttp function, does anyone know why it's not working?