Click here to Skip to main content
15,898,035 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

In my project I am getting the following error. I am using this code to display the menu in my project.

d_iv.text is undefined.

Here is the code for your reference:

C#
var d_iv=_dmvi(id);
var d_lv=0;
while(d_iv.text.charAt(0)=="|")
{
d_lv++;d_iv.text=d_iv.text.substring(1);
}


Thanks in advance
Posted
Comments
Pete O'Hanlon 30-Jun-11 6:23am    
This has nothing to do with XML as far as I can see. Could you please change your tag to identify the language that you are coding this in? I suspect it's JavaScript, but I could be wrong.

1 solution

Well, it's clear that whatever dmvi(id) is, it does not have a text property. That's what the error means. Did you try doing some debugging ? How about alert(d_iv) to find out what it is ?
 
Share this answer
 
Comments
Member 7946563 30-Jun-11 6:44am    
Ya I found where the error is but unable to find the solution the problem is with the browser.
In this code I am using the line for IE

d_v=pf(a.substring(a.indexOf("MSIE")+5,a.length));

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