S
S
Sergey750il2015-08-18 18:47:40
JavaScript
Sergey750il, 2015-08-18 18:47:40

What's wrong with Ajax for IE8?

When clicking on a link in a floating popup, a Bootstrap 3 modal window appears. There are many such popups with a link on one page. In all browsers except IE, everything works as it should, but in IE, the page that should be appears first, but after a moment, the page that was opened first in the modal window seems to be loaded from the cache. What am I doing wrong? What could I be missing?

And another question. The popup has a gallery JS script. While I connect them on the page of the modal window, those where they are called when the link is clicked. How correct is this approach and how do they act in such cases?

var rsrGroups = [path_ag, path_ah, path_aj, path_ak, path_al, path_am, path_ao, path_ap, path_aq, path_ar, path_ca, path_cb];

    path_ag.data("room", "201").attr('cursor', 'pointer');
    path_ah.data("room", "212").attr('cursor', 'pointer');
    path_aj.data("room", "218").attr('cursor', 'pointer');
    path_ak.data("room", "219").attr('cursor', 'pointer');
    path_al.data("room", "202").attr('cursor', 'pointer');
    path_am.data("room", "215").attr('cursor', 'pointer');
    path_ao.data("room", "205").attr('cursor', 'pointer');
    path_ap.data("room", "204").attr('cursor', 'pointer');
    path_aq.data("room", "214").attr('cursor', 'pointer');
    path_ar.data("room", "213").attr('cursor', 'pointer');
    path_ca.data("room", "216").attr('cursor', 'pointer');
    path_cb.data("room", "203").attr('cursor', 'pointer');

    var number = $('.ofice .ofice_status>em').map(function() {
        return $(this).html();
    });

    var number_js = [];

    for (var p = 0, len = number.length; p < len; p++) {
        if (number[p] == 'Свободен') {
            number_js[p] = $('.ofice:eq(' + p + ')>.ofice_number>strong').map(function() {
                return $(this).html();
            })[0];

            for (var i = 0, len = rsrGroups.length; i < len; i++) {
                if (number_js[p] == rsrGroups[i].data("room")) {
                    rsrGroups[i].attr('fill', '#F4DA6C');
                }
            }
        }
    }
    $('.ofice').prepend('<div>Офис</div>');
    $('.ofice_number').after('<div>.............................</div>');
    arr = new Array();
    for (var i = 0, len = rsrGroups.length; i < len; i++) {

        var el = rsrGroups[i];

        el.mouseover(function() {
            var point = this.getBBox(0);


            $('#ofices').next('.point').remove();

            $('#ofices').after($('<div />').addClass('point'));
         
            $('.point')
               

            .css({
                    left: point.x + (point.width / 2) - -300,
                    top: point.y + (point.height / 2) - 800
                })
                .fadeIn();
            $('.data_' + this.data('room') + '').clone()
                .css('display', 'block').addClass('dopclass')

            .appendTo(".point");
            // $('.point .are-us,.point .price,.point hr').css('display', 'block');
            $('.point .ofice_number').next().css('display', 'none');
            $('.point .ofice_number').prev().css('color', '#6e594c');
            var room_this=this.data('room');

            $('.btn').click(function() {
                // $(this).css('display','none');
                $('.point').css('display', 'none');
                $.ajax({
                    url: '/'+room_this+'-2/',
                    cache: false,
                    type: "POST",
                    beforeSend: function() {
                        $('.ddd').html('Please wait...');
                    },
                    success: function(html) {
                        $('.ddd').html(html);
                    }
                });
            });

        });
        $('#ofices').mouseout(function() {
            setTimeout(function() {
                $('.point').css('display', 'none');
                return false;
            }, 1000000);


        });



    }

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
LittleFatNinja, 2015-08-18
@LittleFatNinja

What's wrong with Ajax for IE8?

right to ask:
What's wrong with IE8?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question