Custom, non DD related JavaScripts from other members.
If we want the select box to function as a genuine menu, then a click on a given option (of the select box) must give us the same range of possibilities as does a click on the items of a normal menu. So a click should allow us to go to a new page, to open a popup window, to produce an alert etc. We can achieve this with the help of a function that has the following general form: Code: var which=""; function DoSomethingWithOptionvalue(which) { var optionValue = document.getElementById(which).options[document.getElementById(which).selectedIndex].value; ...
var which=""; function DoSomethingWithOptionvalue(which) { var optionValue = document.getElementById(which).options[document.getElementById(which).selectedIndex].value;
Updated 08-12-2009 at 12:20 AM by molendijk
In the head: Code: <!--[if IE]> <script type="text/javascript"> document.write('<object type="text/html" id="object_id" width="0" height="0" data="menu.html"><\/object>'); onload=function(){ document.getElementById('main_page_id').innerHTML = document.getElementById('object_id').object.documentElement.innerHTML; } </script> <![endif]--> <!--[if ...
<!--[if IE]> <script type="text/javascript"> document.write('<object type="text/html" id="object_id" width="0" height="0" data="menu.html"><\/object>'); onload=function(){ document.getElementById('main_page_id').innerHTML = document.getElementById('object_id').object.documentElement.innerHTML; } </script> <![endif]--> <!--[if
Updated 05-05-2009 at 10:49 PM by molendijk (Correction)
When we use the technique given below, the following happens when we click on a link (in our HTML-menu) in order to go to a new page (which may belong to a foreign domain): bla.html (our own domain) or h ttp://www.blabla.bla (a foreign domain) is included in a dynamically created text/html-object (non-IE) or iframe (IE) (IE doesn't correctly handle the object yet); the object/iframe containing the new page (bla.html or h ttp://www.blabla.bla) is automatically added to a file ...
Updated 03-24-2009 at 11:25 PM by molendijk
The text/html-object can be used to include HTML, except in IE, which doesn't support the object well yet, and where, as a consequence, we should still use an iframe for that purpose. How do we include HTML-menus (which are list-menus, normally)? As HTML-menus may have subitems, and as these subitems must be allowed to appear anywhere on the screen, an object or iframe containing the menu must have 100% size (as a principle, see below for certain restrictions). But ...
Updated 03-21-2009 at 07:47 PM by molendijk (Bug in All Levels Navigational Menu)