Wednesday, April 15, 2009

[JavaScript] Re: cloneNode no result in ie

Oh, one more thing, would placement of the script on page have anything to
do with it running or not? I thought that since it was DOM method that
everything would have to be loaded in before running, so it's at the bottom
of the page.

On Wed, Apr 15, 2009 at 4:25 PM, J.C. Berry <jcharlesberry@gmail.com> wrote:

> hello all, can anyone give me a hint as to why this is working in FF and
> not in IE? I've googled quite a bit, but no go. Thanks in advance.
>
> 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' />
>
> --
> Jonathan Berry, M.A.
> IT Consultant
> 619.306.1712(m)
> jcharlesberry@gmail.com
> "I think the real reason the Extropy Institute closed is because Ayn Rand
> rose from her cryo-sleep" -digibrill
> ____
> ( @ o )
> / | | | | \ Chumby.com
>
>
> ------------------------------------------------------------------------------------------------------------------------------------------------
>
> This E-mail is covered by the Electronic Communications Privacy Act, 18
> U.S.C. ?? 2510-2521 and is legally privileged. This information is
> confidential information and is intended only for the use of the individual
> or entity named above. If the reader of this message is not the intended
> recipient, you are hereby notified that any dissemination, distribution or
> copying of this communication is strictly prohibited.
>
> ------------------------------------------------------------------------------------------------------------------------------------------------
>

--
Jonathan Berry, M.A.
IT Consultant
619.306.1712(m)
jcharlesberry@gmail.com
"I think the real reason the Extropy Institute closed is because Ayn Rand
rose from her cryo-sleep" -digibrill
____
( @ o )
/ | | | | \ Chumby.com

------------------------------------------------------------------------------------------------------------------------------------------------

This E-mail is covered by the Electronic Communications Privacy Act, 18
U.S.C. ?? 2510-2521 and is legally privileged. This information is
confidential information and is intended only for the use of the individual
or entity named above. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited.
------------------------------------------------------------------------------------------------------------------------------------------------


[Non-text portions of this message have been removed]

------------------------------------

Visit http://aiaiai.com for more groups to joinYahoo! Groups Links

<*> To reply to this message, go to:
http://groups.yahoo.com/group/JavaScript_Official/post?act=reply&messageNum=16661
Please do not reply to this message via email. More information here:
http://help.yahoo.com/help/us/groups/messages/messages-23.html

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/JavaScript_Official/join
(Yahoo! ID required)

<*> To change settings via email:
mailto:JavaScript_Official-digest@yahoogroups.com
mailto:JavaScript_Official-fullfeatured@yahoogroups.com

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/JavaScript_Official/

<*> To unsubscribe from this group, send an email to:
JavaScript_Official-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/

[JavaScript] cloneNode no result in ie

hello all, can anyone give me a hint as to why this is working in FF and not
in IE? I've googled quite a bit, but no go. Thanks in advance.

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' />

--
Jonathan Berry, M.A.
IT Consultant
619.306.1712(m)
jcharlesberry@gmail.com
"I think the real reason the Extropy Institute closed is because Ayn Rand
rose from her cryo-sleep" -digibrill
____
( @ o )
/ | | | | \ Chumby.com

------------------------------------------------------------------------------------------------------------------------------------------------

This E-mail is covered by the Electronic Communications Privacy Act, 18
U.S.C. ?? 2510-2521 and is legally privileged. This information is
confidential information and is intended only for the use of the individual
or entity named above. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited.
------------------------------------------------------------------------------------------------------------------------------------------------


[Non-text portions of this message have been removed]

------------------------------------

Visit http://aiaiai.com for more groups to joinYahoo! Groups Links

<*> To reply to this message, go to:
http://groups.yahoo.com/group/JavaScript_Official/post?act=reply&messageNum=16660
Please do not reply to this message via email. More information here:
http://help.yahoo.com/help/us/groups/messages/messages-23.html

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/JavaScript_Official/join
(Yahoo! ID required)

<*> To change settings via email:
mailto:JavaScript_Official-digest@yahoogroups.com
mailto:JavaScript_Official-fullfeatured@yahoogroups.com

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/JavaScript_Official/

<*> To unsubscribe from this group, send an email to:
JavaScript_Official-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/