File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes navigation drop down menu problems Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "navigation drop down menu problems" Watch "navigation drop down menu problems" New topic

navigation drop down menu problems

Little Moose

Joined: Feb 11, 2005
Posts: 1
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

Joined: Jul 30, 2003
Posts: 805
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.

Give a man a fish, he'll eat for one day. Teach a man to fish, he'll drink all your beer.
Cheers, Jeff (SCJP 1.4, SCJD in progress, if you can call that progress...)
I agree. Here's the link:
subject: navigation drop down menu problems
jQuery in Action, 3rd edition