Click here to Skip to main content
15,904,156 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am getting the error in my java script as d_iv.text is undefined.

Here is the code:

var d_lv=0;while(d_iv.text.charAt(0)=="|")

{d_lv++;d_iv.text=d_iv.text.substring(1);}

if(!d_ce||d_ce.d_le<d_lv)

{var newMenu={ULtype:0,i:[],style:itemList[d_iy][7],d_le:d_lv,parentItem:d_ce?

d_ce.i[d_ce.i.length-1]:null};

if(!mainMenu)

{mainMenu=newMenu;}if(newMenu.parentItem)

{newMenu.parentItem.childMenu=newMenu;}


d_iv.parentMenu=newMenu;d_ce=newMenu;}

while(d_ce&&d_ce.d_le>d_lv)

{d_ce=d_ce.parentItem.parentMenu;d_iv.parentMenu=d_ce;}

d_ce.i[d_ce.i.length]=d_iv;}

return mainMenu;}


Thanks in advance
Posted
Updated 29-Jun-11 21:07pm
v2

1 solution

What is d_iv? Is it a div element? If yes then please note that it doesn't have a property with "text" name. If you intend to use JQuery, then there is a method (not a property again) with name "text" which will give you the div's text.
If you can provide some more information like what are you trying to achieve, may be we'll be able to help you better.
 
Share this answer
 
Comments
Member 7946563 30-Jun-11 3:09am    
No this is not a div element. This is used for displaying the menu in my project.
I have taken this code from this website.

http://www.flygtus.com/flygt/canada/flashmenu/deluxe-menu.files/dmenu.js

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900