<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 
<html>
 
<head>
 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 
<title>PHP DHTML Dynamic Menu</title>
 
<style type="text/css">
 
pre{
 
border: 1px solid #333333;
 
background-color:#F2F2F2;
 
}
 
</style>
 
<? 
 
    require_once("menu.php"); 
 
    $menu = new iH2HMenu; 
 
    $menu->files("style.css","js.js"); 
 
?>
 
</head>
 
<body>
 
<a href="http://os.ih2h.net/menu/"><img src="http://os.ih2h.net/menu/logo.gif" width="246" height="49" border="0"></a>
 
<?
 
 
    //Set Main link
 
    $menu->setMainLink('Home','http://os.ih2h.net/menu/');
 
    
 
    //Set Main link with sublink
 
    $menu->setMainLink('other sites');
 
    $menu->setSubLink('other sites','Web Designing','http://www.ih2h.net');
 
    $menu->setSubLink('other sites','H2Hmail','http://www.h2hmail.com');
 
    
 
    //Set Main link
 
    $menu->setMainLink('php classes','http://www.phpclasses.org/');
 
    
 
    //Set Main link with sublink
 
    $menu->setMainLink('Google','search.php');
 
    $menu->setSubLink('Google','Google Search Engine','http://www.google.com');
 
    $menu->setSubLink('Google','Gmail','http://www.gmail.com');
 
    
 
    $menu->makeDivs();
 
?><div style="width:80%; padding:0 0 0 15px;">
 
<div style="height:30px; background-color:#D9E3EB; width:100%; border: solid 1px #A2B9CE; ">
 
<?
 
    $menu->makeLinks();
 
?>
 
</div>
 
<br>
 
Hi,
 
<br>
 
<br>
 
If you do not have the class file <a href="http://os.ih2h.net/menu/ih2hmenu.zip"><strong>click here to download</strong></a><br>
 
<br>
 
This PHP class can be used to generate dynamic DHTML horizontal menus. The implementation is very simiple and can be modified with ease.<br>
 
It uses CSS for easy deployment.<br>
 
<br>
 
Example<br>
 
<pre>    
 
    //Include the class file
 
    require_once("menu.php"); 
 
 
    //Instantiate the class<br>    $menu = new iH2HMenu; 
 
 
    //Files which define the class and javascript<br>    $menu->files("style.css","js.js"); 
 
 
    //Set Main link<br>    $menu->setMainLink('Home','http://os.ih2h.net/menu/');<br>    <br>    //Set Main link with sublink<br>    $menu->setMainLink('other sites');<br>    $menu->setSubLink('other sites','iH2H','http://www.ih2h.net');<br>    $menu->setSubLink('other sites','H2Hmail','http://www.h2hmail.com');<br>    <br>    //Set Main link<br>    $menu->setMainLink('php classes','http://www.phpclasses.org/');
 
 
 
    //Generate the layers
 
    $menu->makeDivs();
 
 
    //Generate the menu
 
    $menu->makelinks();
 
 
</pre>
 
<p><br>
 
  Please do not hesitate to contact me for comments, suggestions or any doubts<br>
 
  <strong><br>
 
  Sandosh Kumar VR</strong><br>
 
  [email protected]<br>
 
  <a href="http://www.ih2h.net/">http://www.ih2h.net/</a></p>
 
</div>
 
</body>
 
</html>
 
 |