Ignore:
Timestamp:
07/05/05 15:59:21 (15 years ago)
Author:
gocher
Message:

Workaround for removeAttribute() and setAttribute()
problems with IE

for Example
object.setAttribute("readOnly",true) in IE
object.setAttribute("readOnly","readOnly") in Mozilla

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/Forms/popups/select.html

    r239 r254  
    1818    case "f_multiple": 
    1919    case "f_disabled": 
    20       document.getElementById(fields[i]).checked = param[fields[i]] == "true"; break; 
     20      document.getElementById(fields[i]).checked = (param[fields[i]]==fields[i].substring(2,20)) || (param[fields[i]] == true); break; 
    2121    case "f_size": 
    2222      document.getElementById(fields[i]).value = (param[fields[i]]<=0)?"":param[fields[i]]; break; 
     
    4646        param["f_multiple"] = ""; 
    4747      else 
    48             param["f_multiple"] = (document.getElementById(fields[i]).checked)?"true":""; 
     48            param["f_multiple"] = (document.getElementById(fields[i]).checked)?"multiple":""; 
    4949            break; 
    5050    case "f_disabled": 
    51       param[fields[i]] = (document.getElementById(fields[i]).checked)?"true":""; break; 
     51      param[fields[i]] = (document.getElementById(fields[i]).checked)?"disabled":""; break; 
    5252    default: 
    5353      param[fields[i]] = document.getElementById(fields[i]).value; break; 
     
    163163    <p /> 
    164164    <div class="fr">Size:</div> 
    165     <input name="size" id="f_size" type="text" value="" size="15"> 
     165    <input name="size" id="f_size" type="text" value="" size="15" /> 
    166166    <p /> 
    167167                <div class="fr"><nobr>Multiple Select</nobr></div> 
    168     <input name="multiple" id="f_multiple" type="checkbox"> 
     168    <input name="multiple" id="f_multiple" type="checkbox" value="multiple" /> 
    169169    <p /> 
    170170    <div class="fr">Disabled</div> 
Note: See TracChangeset for help on using the changeset viewer.