• not working in IE8 - I manage to fix this

    By Siew Keng Lim 1 decade ago

    Hi Mariusz Jakubowski

    I manage to put a little fix in your code for the not working in IE8 problem. 

    just change the _setValueAttr function to as the following. It works for me.

     

    _setValueAttr: function(/* Array */values){
    
    <strong><span style="font-family:courier new,courier,monospace;">&nbsp; &nbsp;  <span style="font-size:14px;"><em>dojo.forEach(this.dropDown.getChildren(), function(node, i) {</em></span></span></strong></div>
    
    <span style="font-size:14px;"><em><strong><span style="font-family: 'courier new', courier, monospace;">&nbsp; &nbsp;  var checked = dojo.indexOf(values, node.option.value) != -1;</span></strong></em></span></div>
    
    <span style="font-size:14px;"><em><strong><span style="font-family: 'courier new', courier, monospace;">&nbsp; &nbsp;  node.attr(&quot;checked&quot;, checked);</span></strong></em></span></div>
    
    <span style="font-size:14px;"><em><strong><span style="font-family: 'courier new', courier, monospace;">&nbsp; &nbsp;  });</span></strong></em></span></div>
    
    &nbsp; &nbsp; &nbsp; &nbsp; this.inherited(arguments);
    
    &nbsp; &nbsp; &nbsp; &nbsp;// save new value in hidden inputs (first destroy old inputs)
    
    &nbsp; &nbsp; &nbsp; &nbsp; dojo.query(this.domNode).query(&quot;input[name=&quot; + this.name + &quot;]&quot;).forEach(function(node) {
    
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dojo.destroy(node);
    
    &nbsp; &nbsp; &nbsp; &nbsp; });
    
    &nbsp; &nbsp; &nbsp; &nbsp; dojo.forEach(this._getValueAttr(), function(val) {
    
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dojo.create(&quot;input&quot;, { name: this.name, type: &quot;hidden&quot;, value: val}, this.domNode);
    
    &nbsp; &nbsp; &nbsp; &nbsp; }, this);
    
    &nbsp; &nbsp; },
    

     

    Thanks for the code, it really save a lot of my trouble. And all the best for the contest. 

     

    • fixed

      By Mariusz Jakubowski 1 decade ago

      Hi,

      sorry for long delay before answering. I have uploaded a new version with your patch.

      Thanks,

      Mariusz