• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

navigation drop down menu problems

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 805
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
I got this tall by not having enough crisco in my diet as a kid. This ad looks like it had plenty of shortening:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic