hi,
I am getting several error from my javaScript I inserted into my javaScript page in DashCode
this all works fine in my page:
http://www.mypubspace.com/dashtest/order.html
I am getting several error from my javaScript I inserted into my javaScript page in DashCode
Code:
function ajaxFunction(){
var townRequest; // The variable that makes Ajax possible!
try{
// Opera 8.0+, Firefox, Safari
townRequest = new XMLHttpRequest();
} catch (e){
// Internet Explorer Browsers
try{
townRequest = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try{
townRequest = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e){
// Something went wrong
alert("Your browser broke!");
return false;
}
}
}
// Create a function that will receive data sent from the server
townRequest.onreadystatechange = function(){
if(townRequest.readyState == 4){
var ajaxDisplay = document.getElementById('ajaxDiv');
ajaxDisplay.innerHTML = townRequest.responseText;
}
}
var name = document.getElementById('name').value;
var county = document.getElementById('county').value;
var town = document.getElementById('town').value;
var queryString = "?name=" + name + "&county=" + county + "&town=" + town;
townRequest.open("GET", "http://www.mypubspace.com/dashtest/pubs.php" + queryString, true);
townRequest.send(null);
}
this all works fine in my page:
http://www.mypubspace.com/dashtest/order.html