0

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?

2
Contributors
5
Replies
9
Views
5 Years
Discussion Span
Last Post by cgull
0

IE is sensitive to missing doctypes, unclosed tags and other minor Javascript typos. Make sure everything is in order. If you debug, do you see your data coming in?

0

Another thing, when I check ie9 with F12, on the top it says:
Browser Mode: IE9 Document Mode: IE9 standards.

Don't know if it matters but I thought I should mention it.

0

After more reading, I did a few more things:
I've disabled the DIVX plugins in ie9
I've added this line first thing in the head tag:
<meta http-equiv="X-UA-Compatible" content="IE=9" />
Nothing helps :( Grrrrrrrrrrrrrrrrrrrrrr..... we should all ban IE from our websites. Put a big red message:

We do not support IE, please use a different browser.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.