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

  • SEARCH
  • Home
  • 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 8348041
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T07:34:11+00:00 2026-06-09T07:34:11+00:00

I have problem with select list in IE (all version). I got two field

  • 0

I have problem with select list in IE (all version). I got two field with directions who depends of City1 and City2 fields. When I pick the City from City1 in direction field should display only 4 directions. Similarly, in the City2 field. Everything working fine in Firefox, Chrom, Opera, but no in IE – I see the whole list of directions.

in my opinion – something is wrong with this code, but i don’t know what:

    if (parseInt($("#finish_day").val()) < 4) {
        $('#return_car').children('#return_car option[value=' + $('#get_car').val() + ']').attr('selected', 'selected').siblings().attr('disabled', true);
        if ($('#return_car').val()) $('#return_car').change();
    } else {
        $('#get_car > option, #return_car > option').prop('disabled', false);
        });
    }

The working code is here: http://jsfiddle.net/utXMD/

Thanks in advice for any help.

  • 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-06-09T07:34:13+00:00Added an answer on June 9, 2026 at 7:34 am

    Delete the commas after the last values in $.viewMap_get and $.viewMap_return objects:

    $.viewMap_get = {
            '0' : $([]),
            'Katowice' : $('#c1a, #c1b, #c6, #c7'),
            'Kraków' : $('#c2a, #c2b, #c6, #c7'),
            'Warszawa' : $('#c3a, #c3b, #c6, #c7'),
            'Wrocław' : $('#c4a, #c4b, #c6, #c7'),
            'Gdańsk' : $('#c5a, #c5b, #c6, #c7')
        };
    
    
    
    $.viewMap_return = {
            '0' : $([]),
            'Katowice' : $('#d1a, #d1b, #d7'),
            'Kraków' : $('#d2a, #d2b, #d7'),
            'Warszawa' : $('#d3a, #d3b, #d7'),
            'Wrocław' : $('#d4a, #d4b,, #d7'),
            'Gdańsk' : $('#d5a, #d5b, #d7')
        };
    

    IE7 and IE8 have issues with JS objects values which ends with a trailing ‘,’.

    UPDATE:

    Try the following code:

    $(function() {
    
        $( "#date_from, #date_to" ).datepicker({
            defaultDate: "+1d",
            minDate: "+1d",
            changeMonth: true,
            changeYear: true,
            dateFormat: "dd/mm/yy",
            monthNamesShort: ["Sty","Lut","Mar","Kwi","Maj","Cze","Lip","Sie","Wrz","Paz","Lis","Gru"],
            dayNamesMin: ["Nie", "Pon", "Wt", "Sr", "Czw", "Pt", "Sob"],
            numberOfMonths: 1,
            onSelect: function( selectedDate ) {
                if(this.id == 'date_from'){
                  var dateMin = $('#date_from').datepicker("getDate");
                  var dateMax = $('#date_to').datepicker('getDate');
                  var rent_date_from = new Date(dateMin.getFullYear(), dateMin.getMonth(),dateMin.getDate() + 1); 
                  var rent_date_to = new Date(dateMin.getFullYear(), dateMin.getMonth(),dateMin.getDate() + 29); 
                  $('#date_to').datepicker("option","minDate",rent_date_from);
                  $('#date_to').datepicker("option","maxDate",rent_date_to);      
                }
                compute(); //Add compute
            }
    
        }); 
    
        $.viewMap_get = {
            '0' : $([]),
            'Katowice' : $('#c1a, #c1b, #c6, #c7'),
            'Kraków' : $('#c2a, #c2b, #c6, #c7'),
            'Warszawa' : $('#c3a, #c3b, #c6, #c7'),
            'Wroclaw' : $('#c4a, #c4b, #c6, #c7'),
            'Gdansk' : $('#c5a, #c5b, #c6, #c7')
        };
    
        $.each($.viewMap_get, function() { $(this).remove(); });
        $('#get_city_district').hide();
    
        $('#get_car').on('change', function() {
            // hide all
            $.each($.viewMap_get, function() { $(this).remove(); });
            $('#get_city_district').hide();
            // show current
            $('#get_city_district').append($.viewMap_get[$(this).val()]).show();
    
            var id = $.viewMap_get[$(this).val()].attr("id");   
            $('#'+id).attr('selected', 'selected');
        });
    
        $.viewMap_return = {
            '0' : $([]),
            'Katowice' : $('#d1a, #d1b, #d7'),
            'Kraków' : $('#d2a, #d2b, #d7'),
            'Warszawa' : $('#d3a, #d3b, #d7'),
            'Wroclaw' : $('#d4a, #d4b,, #d7'),
            'Gdansk' : $('#d5a, #d5b, #d7')
        };
    
        $.each($.viewMap_return, function() { $(this).remove(); });
        $('#return_city_district').hide();
    
        $('#return_car').on('change', function() {
    
            $.each($.viewMap_return, function() { $(this).remove(); });
            $('#return_city_district').hide();
            // show current
            $.viewMap_return[$(this).val()].show();
            $('#return_city_district').append($.viewMap_return[$(this).val()]).show();
    
            var id = $.viewMap_return[$(this).val()].attr("id");
            $('#'+id).attr('selected', 'selected');
        });
    
        function compute() {
            var c = $('select#time_from_hour').val();
            var d = $('select#time_from_minute').val();
            var e = $('select#time_to_hour').val();
            var f = $('select#time_to_minute').val();
            var g = $('input#date_from').val();
            var h = $('input#date_to').val();
            date1= g.split("/");
            var timestamp = (new Date(date1[2],date1[1],date1[0],c,d).getTime()/1000) + 7200;
            $('#total_hour1').val(timestamp);
    
            date2= h.split("/");
            var timestamp = (new Date(date2[2],date2[1],date2[0],e,f).getTime()/1000) + 7200;
            $('#total_hour2').val(timestamp);
    
            var x = -$('input#total_hour1').val();
            var y = -$('input#total_hour2').val();
            var total_time = x - y;
            result = total_time / 86400;
            new_number = Math.ceil(result);
    
            if(isNaN(new_number)) {
              var new_number = 0;
            }
            $('#finish_day').val(new_number);
    
            if( parseInt($("#finish_day").val()) < 4 ) {   
                $('#return_car').children('#return_car option[value=' + $('#get_car').val() + ']').attr('selected', true).siblings().attr('disabled', true);
    
                if ($('#return_car').val()) $('#return_car').change();
            }
            else {
                $('#get_car > option, #return_car > option').prop('disabled', false);
                $('#three_day').hide(2000, function () {
                    $(this).remove();
                });
            }
    
        }
    
    
        $('select#time_from_hour').change(compute);
        $('select#time_from_minute').change(compute);
        $('select#time_to_hour').change(compute);
        $('select#time_to_minute').change(compute);
        // $('select#return_car').change(compute);
        $('select#get_car').change(compute);
        $('input#finish_day').change(compute); 
    
    });
    

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

Sidebar

Related Questions

i have a problem concerning a select query in MYSQL i have two different
I have 2 select lists ausers - List all available users susers - Displays
I have problem while loading data into html select when users press or click
i have problem using LIKE structure in DB2 : for example: select * from
I have a problem with building multi level select box. I have category table
I have a problem with adding OPTIONS to SELECT tag dynamically. Here is my
I have a problem with the query below in postgres SELECT u.username,l.description,l.ip,SUBSTRING(l.createdate,0,11) as createdate,l.action
I have a problem with an SQL query. SELECT SUM(table_colum) AS value, SUM(value *
I have the problem, that MSSQL Server 2000 should select some distinct values from
I have next problem, when I'm trying to retrieve value from xforms:select elements I

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.