tags:

views:

29

answers:

2

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?

A: 

If the elements that you're referring to (markup and package) don't exist, then url is never created, and your request will never be sent. Try sticking alert(url); before httpObject.open(...); and make sure that you've got the right URL.

mattbasta
A: 

Alert the values before constructing the url is your first best bet.Also alert the url after constructing it.

paste the url directly in the browser so that you can see any errors on server side

Hulk