If I do something like
var url = "dynamicprice.php";
httpObject.open("GET", url, true);
everything works, but if I try to pass variables
var url = "dynamicprice.php?package=" + document.getElementById('package').value + "&markup=" + document.getElementById('markup').checked;
httpObject.open("GET", url, true);
I get no answer from dynamicprice.
What do I have to change?
If the elements that you’re referring to (
markupandpackage) don’t exist, thenurlis never created, and your request will never be sent. Try stickingalert(url);beforehttpObject.open(...);and make sure that you’ve got the right URL.