Hi there,
I have been working with the Dropdown HTML, which I found on
http://www.dynamicdrive.com/dynamicindex1/dropdowncontrol.htm
It worked really well, but then I wanted to create another dropdown menu. The second menu was not working at all as it shows the dropdown menu constantly.
My aim was to then look at the dropdown.js, which didn't help me at all as there were no direct references to the links.
Than I looked at the <style type="text/css">.....</style>, which I then copied and changed all the 'a.sample_attach' to 'a.sample_attach1' etc. However, the dropdown menu still didn't hide...
Pls let me know if you have any idea how to multiply the dropdown menu on one page or if you know of another simple dropdown menu that can be implemented several times on the same page.
Thank you very much.
Markus
PS. here is the code
Code:<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Dropdown Sample</title> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <meta name="description" content="" /> <meta name="keywords" content="" /> <script type="text/javascript" src="info/dropdown.js"></script> <style type="text/css"> body { font-size: 0.7em; } h3 { font-size: 1.6em; margin: 0px; } a.sample_attach, a.sample_attach:visited, div.sample_attach { display: block; width: 100px; border: none; padding: 2px 5px; background: #ffffff; text-decoration: none; font-family: Arial, Verdana, Sans-Sherif; font-weight: 900; font-size: 1.0em; color: #000050; } a.sample_attach, a.sample_attach:visited { border-bottom: none; } div#sample_attach_menu_child { border-bottom: none; } form.sample_attach { position: absolute; visibility: hidden; border: none; padding: 0px 5px 2px 5px; background: #FFFFEE; } form.sample_attach b { font-family: Verdana, Sans-Sherif; font-weight: 900; font-size: 1.1em; } input.sample_attach { margin: 1px 0px; width: 170px; } a.sample_attach1, a.sample_attach1:visited, div.sample_attach1 { display: block;1 width: 100px; border: none; padding: 2px 5px; background: #ffffff; text-decoration: none; font-family: Arial, Verdana, Sans-Sherif; font-weight: 900; font-size: 1.0em; color: #000050; } a.sample_attach1, a.sample_attach1:visited { border-bottom: none; } div#sample_attach1_menu_child { border-bottom: none; } form.sample_attach1 { position: absolute; visibility: hidden; border: none; padding: 0px 5px 2px 5px; background: #FFFFEE; } form.sample_attach1 b { font-family: Verdana, Sans-Sherif; font-weight: 900; font-size: 1.1em; } input.sample_attach1 { margin: 1px 0px; width: 170px; } </style> </head> <body> <div> <div id="sample_attach_menu_parent" class="sample_attach"><a href="javascript:alert('dd');">Main Menu</a></div> <div id="sample_attach_menu_child"> <a class="sample_attach" href="javascript:alert('Item 1');">Item 1</a> <a class="sample_attach" href="javascript:alert('Item 2');">Item 2</a> <a class="sample_attach" href="javascript:alert('Item 3');">Item 3</a> </div> <BR> <BR> <BR> <BR> <div id="sample_attach_menu_parent1" class="sample_attach1"><a href="javascript:alert('dd');">Main Menu</a></div> <div id="sample_attach_menu_child1"> <a class="sample_attach1" href="javascript:alert('Item 1');">Item 1</a> <a class="sample_attach1" href="javascript:alert('Item 2');">Item 2</a> <a class="sample_attach1" href="javascript:alert('Item 3');">Item 3</a> </div> <script type="text/javascript"> at_attach("sample_attach_menu_parent", "sample_attach_menu_child", "hover", "y", "pointer"); </script> </div> </body> </html>






Reply With Quote

Bookmarks