Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Apr 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    cloneNode no result in ie

    Hello all, this works fine in FF, but IE? Not even an error message. If there is more that you need for diagnosis, please let me know. Hope you can shed some light on this. Thanks in advance.

    Code:
    function moveThis(proj,parSel,selNum){
        //alert(proj + "[" + parSel + "][" + selNum + "]");
        //alert(parSel);
        var myNewOpt = document.getElementById(proj + '[' + parSel + '][' + selNum + ']').cloneNode(true);
        alert('test');
        myNewOpt.setAttribute('ondblclick', 'document.getElementById("userProjs[' + parSel + '][]").removeChild(this);');
        document.getElementById('userProjs[' + parSel + '][]').appendChild(myNewOpt);
    }
    
    <select onchange="cdf(4)" id="Properties[4]" name="Properties[4]" size="5" title="Double-click to add projects to user" multiple="multiple">
    <option value="Double-click" selected="selected">Dbl click below</option>
    <option value="property1/" id="property1/[4][0]" name="property1/[4][0]" ondblclick="moveThis('property1/',4,0)">property1/</option>
    <option value="property2/" id="property2/[4][1]" name="property2/[4][1]" ondblclick="moveThis('property2/',4,1)">property2/</option>
    <option value="property3/" id="property3/[4][2]" name="property3/[4][2]" ondblclick="moveThis('property3/',4,2)">property3/</option>
    <option value="property4/" id="property4/[4][3]" name="property4/[4][3]" ondblclick="moveThis('property4/',4,3)">property4/</option>
    <option value="On Broadway/" id="On Broadway/[4][4]" name="On Broadway/[4][4]" ondblclick="moveThis('On Broadway/',4,4)">On Broadway/</option></select>
    
    <select onchange="cdf(4)" id="userProjs[4][]" name="userProjs[4][]" size="5" title="Double-click to remove projects" multiple="multiple">
    <option value="property1/" selected="selected" ondblclick="document.getElementById('userProjs[4][]').removeChild(this);">property1/</option>
    <option value="property2/" selected="selected" ondblclick="document.getElementById('userProjs[4][]').removeChild(this);">property2/</option>
    </select>
      <input id='sendReminder[4]' name='sendReminder[4]' title='Send user password reminder' value='digibrill@gmail.com&dvbz777' type='checkbox' />
      <input id='d_e_l_e_t_e[4]'  name='d_e_l_e_t_e[4]' title='Delete this user completely' type='checkbox'  />

  • #2
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    Code:
    myNewOpt.setAttribute('ondblclick', 'document.getElementById("userProjs[' + parSel + '][]").removeChild(this);');
    IE does not consider the events as attributes. One solution could be to use DOM 0 syntax:
    Code:
    myNewOpt.ondblclick=function(){document.getElementById("userProjs[" + parSel + "][]").removeChild(this)}
    BUT! as far as I know IE does not support any event upon the OPTION elements, thus your problem has no solution.
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •