Hello,
I have a problem with an Ajax call on IE9.
I have searched the internet and this forum for solutions for a few hours and can't find an answer.
I have a coffee roastery site (developed with Codeigniter), where the users can order coffee bags online.
The user selects the blend and the quantity he wants and press a button to display the updated quantities on the right side of the screen.
Of course, works find everywhere besides IE9.
The problem is that in IE9 it just displays the last value the user added and not all the values that were there before. The page needs to be refreshed in order to see all the quantities added.
The jQuery code on the page:
<script type="text/javascript">
$(".grindform").submit(function() {
var productId = $('#productId').val();
var selected = $(this);
var weight = $('#selectedWeight').val();
var qtyEsp = $('#qtyEsp').val();
var qtyFilter = $('#qtyFilter').val();
var qtyPlunger = $('#qtyPlunger').val();
var qtyTurkish = $('#qtyTurkish').val();
var qtyBeans = $('#qtyBeans').val();
var eroast = $('#eroast').val();
var froast = $('#froast').val();
var proast = $('#proast').val();
var troast = $('#troast').val();
var broast = $('#broast').val();
$.ajax({
type: "POST",
url: "<?php echo base_url();?>order/orderonline/addCartItem",
data: {productId: productId, weight: weight, ajax: '1', qtyEsp: qtyEsp, qtyFilter: qtyFilter, qtyPlunger: qtyPlunger, qtyTurkish: qtyTurkish, qtyBeans: qtyBeans, eroast: eroast, froast: froast, proast: proast, troast: troast, broast: broast},
success: function(data){
if(data == 'true')
{
$.get("<?php echo base_url(); ?>order/orderonline/showCart" + new Date().getTime(), function(cart)
{
console.log(cart);
$("#cartContent").html(cart);
selected.parent().slideToggle();
});
$('#k').show();
$('#g').show();
}
else if(data != '')
{
$('#selectQty').html(data);
}
if(data == '')
{
alert("Product does not exist");
}
}
});
return false;
});//End gform submit
Can someone please, please help me?