Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 926413
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T19:40:56+00:00 2026-05-15T19:40:56+00:00

Which fragment of code bellow can not work in MSIE? $(document).ready(function() { var minId;

  • 0

Which fragment of code bellow can not work in MSIE?

 $(document).ready(function() {
            var minId;
            var fadeTime = '25';

            $.ajax({
                url: 'JsonFileWrite.php',
                type: "POST",
                data: "idRequest=true",
                success: function(data) {
                    minId = data;
                }
            });

            $(".close").click(function(){
                $(".showable").fadeOut(fadeTime);
            });

            $("#selected").bind('keypress', function(e){
                var code = (e.keyCode ? e.keyCode : e.which);
                if(code == 13) {
                    $("#selected-ok").click();
                }
                }).corner();
            $("#clicked").bind('keypress', function(e){
                var code = (e.keyCode ? e.keyCode : e.which);
                if(code == 13) {
                    $("#clicked-ok").click();
                }
                }).corner();


            $("#shadow").corner();
            $("#shadow2").corner();

            $("#selected-ok").click(function(){
                $(".close").click();
                var $inputs = $('#selectForm :input');
                var values = {};
                $inputs.each(function() {
                    values[this.name] = $(this).val();
                });
                values['allDay'] = $("#allDayT:checked").val();
                if(values['allDay'] == 'caly'){
                    values['allDay'] = true;
                }
                else{
                    values['allDay'] = false;
                }
                minId++;
                calendar.fullCalendar('renderEvent',
                {
                    id: minId,
                    title: values['name'],
                    start: values['start'],
                    end: values['end'],
                    allDay: values['allDay']
                },
                true);
                $.ajax({
                url: 'JsonFileWrite.php',
                type: "POST",
                data: 'id='+minId+'&title='+values['name']+'&start='+values['start']+'&end='+values['end']+'&allDay='+values['allDay']+'',
                success: function(data) {

                }
                });
                calendar.fullCalendar('unselect');
                return false;
            });

            $("#clicked-ok").click(function(){
                $(".close").click();
                var $inputs = $('#clickForm :input');
                var values = {};
                $inputs.each(function() {
                    values[this.name] = $(this).val();
                });

                values['allDay'] = $("#allDayCT:checked").val();
                if(values['allDay'] == 'caly'){
                    values['allDay'] = true;
                }
                else{
                    values['allDay'] = false;
                }

                $.ajax({
                url: 'JsonFileWrite.php',
                type: "POST",
                data: 'id='+values['id']+'&title='+values['name']+'&start='+values['start']+'&end='+values['end']+'&allDay='+values['allDay']+'',
                success: function(data) {

                }
                });
                calendar.fullCalendar( 'removeEvents',  values['id']);

                calendar.fullCalendar('renderEvent',
                {
                    id: values['id'],
                    title: values['name'],
                    start: values['start'],
                    end: values['end'],
                    allDay: values['allDay']
                },
                true);
                return false;
            });

            $("#clicked-delete").click(function(){
                if(confirm("Czy na pewno usunąć wydarzenie?")){
                    $(".close").click();
                    var $inputs = $('#clickForm :input');
                    var values = {};
                    $inputs.each(function() {
                        values[this.name] = $(this).val();
                    });
                    }
                    calendar.fullCalendar( 'removeEvents',  values['id']);
                    $.ajax({
                        url: 'JsonFileWrite.php',
                        type: "POST",
                        data: 'delId='+values['id'],
                        success: function(data) {
                        }
                    });
            });

            function addEvent(title, start, end, allDay){
                if (title) {
                        calendar.fullCalendar('renderEvent',
                        {
                            title: title,
                            start: start,
                            end: end,
                            allDay: allDay
                        },
                        true // make the event "stick"
                    );
                    }
                    calendar.fullCalendar('unselect');
            }

            function convertDate(date, addH, addM){
                //Sat Jul 10 2010 00:00:00 GMT+02
                if(date != null){
                    var arr = explodeArray(date, " ");
                    var time = explodeArray(arr[4], ":");

                    addH = typeof(addH) != 'undefined' ? addH : 0;
                    addM = typeof(addM) != 'undefined' ? addM : 0;
                    time[0] = parseInt(time[0], 10) + parseInt(addH, 10);
                    time[1] = parseInt(time[1], 10) + parseInt(addM, 10);
                    time[0] = time[0] < 10 ? '0' + time[0].toString() : time[0];
                    time[1] = time[1] < 10 ? '0' + time[1].toString() : time[1];

                    switch(arr[1]){
                        case 'Jan':
                            arr[1] = '01'
                        break;
                        case 'Feb':
                            arr[1] = '02'
                        break;
                        case 'Mar':
                            arr[1] = '03'
                        break;
                        case 'Apr':
                            arr[1] = '04'
                        break;
                        case 'May':
                            arr[1] = '05'
                        break;
                        case 'Jun':
                            arr[1] = '06'
                        break;
                        case 'Jul':
                            arr[1] = '07'
                        break;
                        case 'Aug':
                            arr[1] = '08'
                        break;
                        case 'Sep':
                            arr[1] = '09'
                        break;
                        case 'Oct':
                            arr[1] = '10'
                        break;
                        case 'Nov':
                            arr[1] = '11'
                        break;
                        case 'Dec':
                            arr[1] = '12'
                        break;
                        default:
                            arr[1] = 'ERROR!'
                        break;
                    }

                    return arr[3]+'-'+arr[1]+'-'+arr[2]+' '+ time[0] +':'+time[1];
                }
                else{
                    return "";
                }
                return date;
            }

            function explodeArray(item,delimiter) {
                tempArray=new Array(1);
                var Count=0;
                var tempString=new String(item);
                while (tempString.indexOf(delimiter)>0) {
                    tempArray[Count]=tempString.substr(0,tempString.indexOf(delimiter));
                    tempString=tempString.substr(tempString.indexOf(delimiter)+1,tempString.length-tempString.indexOf(delimiter)+1);
                    Count=Count+1
                }

                tempArray[Count]=tempString;
                return tempArray;
            }

            var AnyTimeCfgArray = {
                format: "%Y-%m-%d %H:%i",
                labelTitle: "Data i czas",
                labelHour: "Godzina",
                labelMinute: "Minuta",
                labelDismiss: '<img src="img/close.png" alt="Zamknij..." />',
                labelDayOfMonth: "Dzień",
                labelMonth: "Miesiąc",
                labelYear: "Rok",
                monthAbbreviations: ['Sty', 'Lut', 'Mar', 'Kwi', 'Maj', 'Cze', 'Lip', 'Sie', 'Wrz', 'Paź', 'Lis', 'Gru'],
                monthNames: ['Styczeń', 'Luty', 'Marzec', 'Kwiecień', 'Maj', 'Czerwiec', 'Lipiec', 'Sierpień', 'Wrzesień', 'Październik', 'Listopad', 'Grudzień'],
                dayAbbreviations: ['N', 'Pn', 'Wt', 'Śr', 'Cz', 'Pt', 'So'],
                dayNames: ['Niedziela', 'Poniedziałek', 'Wtorek', 'Środa', 'Czwartek', 'Piątek', 'Sobota'],
                firstDOW: 1
            }
            $("#sStart").AnyTime_picker(AnyTimeCfgArray).focus(function(){ $("div.AnyTime-win").corner();});
            $("#sEnd").AnyTime_picker(AnyTimeCfgArray).focus(function(){ $("div.AnyTime-win").corner();});
            $("#cStart").AnyTime_picker(AnyTimeCfgArray).focus(function(){ $("div.AnyTime-win").corner();});
            $("#cEnd").AnyTime_picker(AnyTimeCfgArray).focus(function(){ $("div.AnyTime-win").corner();});

            $(".showable").hide();
            var calendar = $('#calendar').fullCalendar({
                allDayText: 'Wydarzenie całodniowe',
                allDaySlot: true,
                axisFormat: 'HH:mm',
                buttonText: {
                    prev:     '&nbsp;&#9668;&nbsp;',  // left triangle
                    next:     '&nbsp;&#9658;&nbsp;',  // right triangle
                    prevYear: '&nbsp;&lt;&lt;&nbsp;', // <<
                    nextYear: '&nbsp;&gt;&gt;&nbsp;', // >>
                    today:    'dziś',
                    month:    'miesiąc',
                    week:     'tydzień',
                    day:      'dzień'
                },
                columnFormat: {
                    month: 'ddd',
                    week: 'ddd d.MM.yyyy',
                    day: 'dddd, d.MM.yyyy'  // Monday 9/7
                },
                firstDay: 1,
                titleFormat: {
                    month: 'MMMM yyyy',                             // September 2009
                    week: "d[ yyyy]{ '&#8212;'[ MMM] d MMMM yyyy}", // 7 - 13 September 2009
                    day: 'dddd, d MMMM yyyy'                  // Tuesday, 8 September 2009
                },
                header: {
                    left: 'prev,next today',
                    center: 'title',
                    right: 'month,agendaWeek,agendaDay'
                },
                monthNames: ['Styczeń', 'Luty', 'Marzec', 'Kwiecień', 'Maj', 'Czerwiec', 'Lipiec', 'Sierpień', 'Wrzesień', 'Październik', 'Listopad', 'Grudzień'],
                monthNamesShort: ['Styczeń', 'Luty', 'Marzec', 'Kwiecień', 'Maj', 'Czerwiec', 'Lipiec', 'Sierpień', 'Wrzesień', 'Październik', 'Listopad', 'Grudzień'],
                dayNames: ['Niedziela', 'Poniedziałek', 'Wtorek', 'Środa', 'Czwartek', 'Piątek', 'Sobota'],
                dayNamesShort: ['N', 'Pn', 'Wt', 'Śr', 'Cz', 'Pt', 'So'],
                selectable: true,
                selectHelper: true,

                select: function(start, end, allDay, jsEvent, view) {
                    $(".showable").fadeOut(fadeTime);
                    $("#selected").fadeOut(fadeTime, function(){

                        $("#sStart").val(convertDate(start));
                        if (start.toString() == end.toString()){
                            $("#sEnd").val(convertDate(end, 23, 59));
                        }
                        else{
                            $("#sEnd").val(convertDate(end));
                        }
                        $("#allDayT").attr('checked', allDay);
                        $("#allDayN").attr('checked', !allDay);

                        /*var content = '';
                        content += '        Od: <input type="text" id="sStart" name="start" value="'+convertDate(start)+'" /><br />';
                        if (start.toString() == end.toString()){
                            content += '        Do: <input type="text" id="sEnd" name="end" value="'+convertDate(end, 23, 59)+'" /><br />';
                        }
                        else{
                            content += '        Do: <input type="text" id="sEnd" name="end" value="'+convertDate(end)+'" /><br />';
                        }
                        content += '        Nazwa: <input type="text" name="name" value="" /><br />';
                        content += '        Wydarzenie całodniowe: <br /><input id="allDayT" name="allDay" value="caly" type="radio"';
                        if(allDay){
                            content += ' checked="checked"';
                        }
                        content += ' /> <label for="allDayT">Tak</label> <input id="allDayN" name="allDay" value="niecaly" type="radio"';
                        if(!allDay){
                            content += ' checked="checked"';
                        }
                        content += ' /> <label for="allDayN">Nie</label>';
                        $("#selected-content").html(content);*/

                        $('#selected').css('left', jsEvent.pageX);
                        $('#selected').css('top', jsEvent.pageY);
                        $("#selected").fadeIn(fadeTime);
                        var width = $("#selected").width();
                        var height = $("#selected").height();
                        $('#shadow').css('width', width + 5);
                        $('#shadow').css('height', height + 5);
                        $('#shadow').css('left', jsEvent.pageX + 3);
                        $('#shadow').css('top', jsEvent.pageY + 3);
                        $("#shadow").fadeIn(fadeTime);
                    });
                },
                editable: true,
                eventClick: function(calEvent, jsEvent, view) {
                    $(".showable").fadeOut(fadeTime);
                    $("#clicked").fadeOut('100', function(){
                        $("#cId").val(calEvent.id.toString());
                        $("#cStart").val(convertDate(calEvent.start));
                        $("#cEnd").val(convertDate(calEvent.end));
                        $("#cName").val(calEvent.title);
                        $("#allDayCT").attr('checked', calEvent.allDay);
                        $("#allDayCN").attr('checked', !calEvent.allDay);

                        /*var content = '     <input type="hidden" name="id" value="'+calEvent.id+'" />';
                        content += '        Od: <input type="text" id="cStart" name="start" value="'+convertDate(calEvent.start)+'" /><br />';
                        content += '        Do: <input type="text" id="cEnd" name="end" value="'+convertDate(calEvent.end)+'" /><br />';
                        content += '        Nazwa: <input type="text" name="name" value="'+calEvent.title+'" /><br />';
                        content += '        Wydarzenie całodniowe: <br /><input id="allDayCT" name="allDay" value="caly" type="radio"';
                        if(calEvent.allDay){
                            content += ' checked="checked"';
                        }
                        content += ' /> <label for="allDayCT">Tak</label> <input id="allDayCN" name="allDay" value="niecaly" type="radio"';
                        if(!calEvent.allDay){
                            content += ' checked="checked"';
                        }
                        content += ' /> <label for="allDayCN">Nie</label>';
                        $("#clicked-content").html(content);*/

                        $('#clicked').css('left', jsEvent.pageX);
                        $('#clicked').css('top', jsEvent.pageY);
                        $("#clicked").fadeIn(fadeTime);
                        var width = $("#clicked").width();
                        var height = $("#clicked").height();
                        $('#shadow2').css('width', width + 5);
                        $('#shadow2').css('height', height + 5);
                        $('#shadow2').css('left', jsEvent.pageX + 3);
                        $('#shadow2').css('top', jsEvent.pageY + 3);
                        $("#shadow2").fadeIn(fadeTime);
                    });
                },

                eventDragStart: function(){$(".close").click();},
                eventDragStop: function(){$(".close").click();},

                eventResizeStart: function(){$(".close").click();},
                eventResizeStop: function(){$(".close").click();},
                viewDisplay: function(){$(".close").click();},

                eventDrop: function(event, dayDelta, minuteDelta, allDay, revertFunc, jsEvent, ui, view) {
                    $(".close").click();
                    $.ajax({
                        url: 'JsonFileWrite.php',
                        type: "POST",
                        data: 'id='+event.id+'&title='+event.title+'&start='+convertDate(event.start)+'&end='+convertDate(event.end)+'&allDay='+allDay+'',
                        success: function(data) {
                        }
                    });
                },
                eventResize: function(event, dayDelta, minuteDelta, revertFunc, jsEvent, ui, view){
                    $(".close").click();
                    $.ajax({
                        url: 'JsonFileWrite.php',
                        type: "POST",
                        data: 'id='+event.id+'&title='+event.title+'&start='+convertDate(event.start)+'&end='+convertDate(event.end)+'&allDay='+event.allDay+'',
                        success: function(data) {
                        }
                    });
                },
                events: "json-events.php"
            });

        });
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T19:40:57+00:00Added an answer on May 15, 2026 at 7:40 pm

    In other browsers calendar shows properly. In MSIE I’ve got only window with ID = “clicked-ok”. Maybe sharing whole project will be better idea?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Below are two fragments (ready to compile) of code. In first fragment in which
In this code fragment, which constructor is actually called? Vector v = getVector(); Vector
I want to use an older code-fragment in my Qt-project, which is using WinSocks.
I am trying to understand a code, here is fragment which is causing confusion:
On a click event, I want to add a fragment of html code which
I have the following code fragment but when I execute it is not printing
I have this following code fragment which is accessed by different threads. try {
I am using C#, Ajax for coding. Please see below code which I am
I have a simple code fragment which does Base64 decoding on the contents of
I have a HTML fragment which contains two anchor tags in various parts of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.