Topic awaiting preservation: JS illiteracy, guidance needed (Page 1 of 1) |
|
---|---|
Paranoid (IV) Inmate From: |
posted 07-31-2005 20:00
Well, once again I have been screwing and experimenting with all this web gibberish, such a mess |
Paranoid (IV) Inmate From: Florida |
posted 08-01-2005 00:35
http://www.gazingus.org/html/menuExpandable3.html |
Paranoid (IV) Inmate From: |
posted 08-01-2005 03:07
alright, thanks for the link. But if I am not going to use frames, should I simply identify a page as a specific link with all same code and simply edit it accordingly? |
Paranoid (IV) Inmate From: Florida |
posted 08-01-2005 04:24
quote:
quote:
quote:
|
Paranoid (IV) Inmate From: |
posted 08-01-2005 04:40
hmm I will take into consideration waht you have said about frames... |
Paranoid (IV) Inmate From: |
posted 08-01-2005 06:04
ok...now I have tried to replace JS code with the one you provided, trying to keep my visual style the same...again unsatisfactory, I guess I dont know what I am doing... take a look code: </style> <script type="text/javascript" src="/js/menuExpandable3.js"></script> <script type="text/javascript"> <!-- window.onload = function() { initializeMenu("mediaMenu", "mediaActuator"); initializeMenu("digitalMenu", "digitalActuator"); initializeMenu( "otherMenu", "otherActuator"); initializeMenu( "stuffMenu", "stuffActuator"); } //--> </script> </head> <body> <div id="header"><div class="head"> <div class="headright">Arthur Matveicenkov </div></div></div> <ul id="copyright"> all images © 2005 </ul> <ul id="menu"> <li><a target=center href="#">Index</a> <li><a href="#" id="mediaActuator" class="actuator">Media</a> <ul id="mediaMenu" class="menu"> <li><a href="#">Item 1</a> <li><a href="#">Item 2</a> <li><a href="#">Item 3</a> <li><a href="#">Item 4</a> </ul> </li> <li> <a href="#" id="digitalActuator" class="actuator">Digital</a> <ul id="digitalMenu" class="menu"> <li><a href="#">Item 1</a> <li><a href="#">Item 2</a> <li><a href="#">Item 3</a> <li><a href="#">Item 4</a> </ul> </li> <li> <a href="#" id="otherActuator" class="actuator">Other</a> <ul id="otherMenu" class="menu"> <li><a href="#">Item 1</a> <li><a href="#">Item 2</a> <li><a href="#">Item 3</a> <li><a href="#">Item 4</a> </ul> </li> <li> <a href="#" id="stuffActuator" class="actuator">Stuff</a> <ul id="stuffMenu" class="menu"> <li><a href="#">Info</a> <li><a href="#">Links</a> </ul> </li> </ul> </body> </html>
code: if (!document.getElementById) document.getElementById = function() { return null; } function initializeMenu(menuId, actuatorId) { var menu = document.getElementById(menuId); var actuator = document.getElementById(actuatorId); if (menu == null || actuator == null) return; actuator.onclick = function() { var display = menu.style.display; return false; } }
|
Paranoid (IV) Inmate From: |
posted 08-02-2005 03:33
alright, like reisio suggested I am going to drop the idea of using frames. Instead I will add the "contain box" where I will be putting up all my content. |