Changeset 9692


Ignore:
Timestamp:
Dec 9, 2009, 4:19:37 AM (12 years ago)
Author:
kjg
Message:

(trunk web) IE doesn't like to set the innerHTML of selects, so do this differently. Should fix #2652

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/web/javascript/transmission.js

    r9678 r9692  
    318318
    319319        initTurtleDropDowns: function() {
    320                 var i, out, hour, mins;
     320                var i, out, hour, mins, start, end, value, content;
    321321                // Build the list of times
    322322                out = "";
     323                start = $('#turtle_start_time')[0];
     324                end = $('#turtle_end_time')[0];
    323325                for (i = 0; i < 24 * 4; i++) {
    324326                        hour = parseInt(i / 4);
    325327                        mins = ((i % 4) * 15);
    326                         out += "<option value='" + (i * 15) + "'>" + hour + ":" + (mins == 0 ? "00" : mins) + "</option>";
    327                 }
    328                 setInnerHTML( $('#turtle_start_time')[0], out );
    329                 setInnerHTML( $('#turtle_end_time')[0], out );
     328
     329                        value = (i * 15);
     330                        content = hour + ":" + (mins == 0 ? "00" : mins);
     331                        start.options[i] = new Option(content, value);
     332                        end.options[i]  = new Option(content, value);
     333                }
    330334        },
    331335
Note: See TracChangeset for help on using the changeset viewer.