3pepe3
December 18th, 2008, 05:36 AM
Hello world,
I'm an actionscripter, and now i'm testing with javascript.
for example in flash i have mc.mc1.mc2... and if i'm on the scope of mc2 i can use this._parent._parent to reach the scope of mc.
in javascript i can't find the way to reach the parent of an element...
Example:
I have a line like this:
<ul>
<li><label for="code_postal" class="element">ble :</label><div class="element"><input id="myNode" type="text" /></div></li>
<li>...</li>
<li>...</li>
</ul>
then in javascript my scope is this:
var el=document.getElementById("myNode");
How can i reach the li tag of this element?
Thanks
Pepe
I'm an actionscripter, and now i'm testing with javascript.
for example in flash i have mc.mc1.mc2... and if i'm on the scope of mc2 i can use this._parent._parent to reach the scope of mc.
in javascript i can't find the way to reach the parent of an element...
Example:
I have a line like this:
<ul>
<li><label for="code_postal" class="element">ble :</label><div class="element"><input id="myNode" type="text" /></div></li>
<li>...</li>
<li>...</li>
</ul>
then in javascript my scope is this:
var el=document.getElementById("myNode");
How can i reach the li tag of this element?
Thanks
Pepe