I've beat my head agains a wall for two days now trying to figure out why I can't get the following code to work. This is a change action on a <select> input and in its barest form it works.
The following code I KNOW is not correct but I don't know how to make it right:
var shipping= <?php echo $shipping; ?>;
// (needs to receive a php variable called $shipping but this doesn't work)
var subtotal= <?php echo $subtotal; ?>;
// (needs to receive a php variable called $subtotal but this doesn't work)
var taxrate="gettax.php?countynum=" + $("#countylist").val()+"&city_x=" + $("#citylist").val()+"&zip5=" + $("#ziplist").val();
// the above returns a float from a MySQL table
// to be displayed as 7% or 6.3% etc. for instance
// to be displayed as $6.50, for instance
// to be displayed as $ value ($54.60, for instance)
// displays corrctly when I assign taxrate as a test value
$("#thetax").load(tax); // ditto
$("#thetotalcharge").load(totaldue); // ditto
Even when I try to assign test values to shipping and tax it doesn't display
I've tried so many variations of the code above that I've gotten a headache.
can anyone help me out?