o0O0o.o0O0o
02-12-2008, 02:27 AM
hi i have the list kike below
<UL id ='ul1'>
<LI id = 'li2' >
<a --->
<div id ='1'>Grocery
<a id = 'a3'class >Link
</a>
</div>
</a>
</li>
<UL id ='ul1'>
<LI id = 'li2' >
<a --->
<div id ='1'>Grocery-sub.
.
.
.
.
.
what i want is when i click on link a new text box appears after grocery
but i am not able to do it
i am able to get the reference of <li> but i am not able to get the reference of next <ul> element
i am using the following code
function setInsertable(id)
{
obj = document.getElementById(id);
a = obj.parentNode;
b = a.parentNode;
c = b.parentNode;
insertionPoint = c.lastChild;
v = insertionPoint.nextSibling
alert(v.id);
<UL id ='ul1'>
<LI id = 'li2' >
<a --->
<div id ='1'>Grocery
<a id = 'a3'class >Link
</a>
</div>
</a>
</li>
<UL id ='ul1'>
<LI id = 'li2' >
<a --->
<div id ='1'>Grocery-sub.
.
.
.
.
.
what i want is when i click on link a new text box appears after grocery
but i am not able to do it
i am able to get the reference of <li> but i am not able to get the reference of next <ul> element
i am using the following code
function setInsertable(id)
{
obj = document.getElementById(id);
a = obj.parentNode;
b = a.parentNode;
c = b.parentNode;
insertionPoint = c.lastChild;
v = insertionPoint.nextSibling
alert(v.id);