• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

drop down menu -- trouble in loading images.

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all,
i m rendering the html and javascript from a java file using a string buffer . the requirement is menu should work in nn4+,ie4+ browsers. i m checking the browser using doc.all for ie4 , doc.getelementbyid for ie6,nn6.. and doc.layers for nn4.
the menu comes in a nested table in the page.. as it has layouts.
i m using div. nn4 requires div to be absolutely positioned.but when i change it to relative for doc.all.. the image doesnt get displayed the first time the page is loaded only in doc.all browsers. if i put a alert .. it works. i dont want it to be absolute becoz the positions wil have to be hardcoded and it wont be efficient code..
the toggle part is working fine..
the below javascript code is in a function which is called in onload of html.


the logic is bit bad i feel ..but had to do those to make it work in netscape 4(4.79) versions.



code in html body.



sorry had some problem with html submitting ..so syntax is wrong.
 
shiva
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
<div id="title0" style="position: absolute ;top:280px" >
<a href="#" onClck="WM_toggle(0); return false"><img id="pic0" name="pic0" src="closed.gif" alt=""border="0" >Category 1</a>
</div>
<div id="title1" class="menu" style="position: absolute">
<a href="page01.html" target="right">Item # 1</a><br>
<a href="page02.html" target="right">Item # 2</a>
</div>
<div id="title2" style="position: absolute">
<a href="#" onClck="WM_toggle(2); return false"><img id="pic2"name="pic2" src="closed.gif" alt=""border="0">-Category 2</a>
</div>
<div id="title3" class="menu" style="position: absolute">
<a href="page03.html" target="right">Item # 3</a><br>
<a href="page01.html" target="right">Item # 1</a><br>
</div>
reply
    Bookmark Topic Watch Topic
  • New Topic