Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

navigation drop down menu problems

 
Little Moose
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am following the Navigation Drop Down Menu from Eric Pascarello in the visual blueprint book. When I apply to my application the function getObjectXY is pulling the coordinates from a parent element.

In my code I have the div that is invoking the function nested within another div. So it looks like the javascript for this function continually tries to grab the coordinates of the parent (code: theElement = theElement.offsetParent; ) and returns those coordinates. In my case I just want to grab the coordinates of the div tag that is invoking it.

So I took out the while loop out and it seems to work ok - for now. So I guess my question is why is that while loop in there - I am sure there is a reason for it.
 
Jeff Bosch
Ranch Hand
Posts: 805
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Two quick points:

1. Java is not JavaScript. You may want to post your question in the JavaScript forum.

2. The sheriff will squawk about your display name, so you may want to change it before the 'cuffs come out.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic