error: submenu.style is null or not an object

Discussion in 'JavaScript' started by fallen1, Jan 18, 2009.

  1. #1
    fallen1, Jan 18, 2009 IP
  2. fallen1

    fallen1 Peon

    Messages:
    857
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #2
    anybody please help...

    thanks
     
    fallen1, Jan 18, 2009 IP
  3. lp1051

    lp1051 Well-Known Member

    Messages:
    163
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    108
    #3
    Hi fallen1,

    the error is because of this :
    ss = subs.getElementsByTagName('UL');
    submenu = ss[0];
    => no matter if there's some 'UL' tag and its first child you assing it into submenu variable. So you need to be sure there's always some UL pair in the first level. To fix the error, you need to add <ul></ul> inside <li></li> tags for - XPS Foam Board Line and PE and PS Foam Recycling Line.
    Better now??
     
    lp1051, Jan 18, 2009 IP
    fallen1 likes this.
  4. fallen1

    fallen1 Peon

    Messages:
    857
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #4
    thanks man...+ rep for you...:D
     
    fallen1, Jan 19, 2009 IP