I am having some issues getting my jquery function to take my data from my input html form element.
Here is my javascript:
<script>
$(function(){
$('#estimate').click(function() {
var postcode_entry = $('#postcode_entry').value;
$("#shipping_method").html("<div style=\'margin:20px auto;width:100px;text-align:center;\'><img src=\'ext/jquery/bxGallery/spinner.gif\' /></div>").show();
$.get("checkout_shipping.php", {country: "38", refresh_quotes: "1", postcode: postcode_entry, zone_name: "canada" },
function(data){
$("#shipping_method").html(data);
}
);
});
});
</script>
html:
<input type="text" name="postcode" id="postcode_entry" />
<button type="button" id="estimate" >Estimate..</button>
I am not able to get the postcode_entry data into the function. if I hard code a postal code in then it works properly.