Ajax Layer JavaScript DHTML



euDock 2.0 examples








Simple euDock 2.0



To make this possible you must write inside your page:


Place inside your <HEAD></HEAD> HTML tag:

<HEAD>
   <script language="JavaScript1.3" src="js/euDock.2.0.js"></script>
   <script language="JavaScript1.3" src="js/euDock.Image.js"></script>
</HEAD>

And everywhere:

<script>
   euEnv.imageBasePath="js/";
   var dock = new euDock();
   
   dock.setBar({
        left      :{euImage:{image:"barImages/dockBg-l.png"}},
        horizontal:{euImage:{image:"barImages/dockBg-c-o.gif"}},
        right     :{euImage:{image:"barImages/dockBg-r.png"}}
     });
   
   dock.setIconsOffset(2);
       
   dock.addIcon(new Array({euImage:{image:"iconsEuDock/cube.png"}}),
                {link:"http://eudock.jules.it"});
   dock.addIcon(new Array({euImage:{image:"iconsEuDock/cube.png"}}),
                {link:"http://eudock.jules.it"});
   dock.addIcon(new Array({euImage:{image:"iconsEuDock/cube.png"}}),
                {link:"http://eudock.jules.it"});
   dock.addIcon(new Array({euImage:{image:"iconsEuDock/cube.png"}}),
                {link:"http://eudock.jules.it"});
   dock.addIcon(new Array({euImage:{image:"iconsEuDock/cube.png"}}),
                {link:"http://eudock.jules.it"});
   dock.addIcon(new Array({euImage:{image:"iconsEuDock/cube.png"}}),
                {link:"http://eudock.jules.it"});
   dock.addIcon(new Array({euImage:{image:"iconsEuDock/cube.png"}}),
                {link:"http://eudock.jules.it"});
   dock.addIcon(new Array({euImage:{image:"iconsEuDock/cube.png"}}),
                {link:"http://eudock.jules.it"});
   dock.addIcon(new Array({euImage:{image:"iconsEuDock/cube.png"}}),
                {link:"http://eudock.jules.it"});
   dock.addIcon(new Array({euImage:{image:"iconsEuDock/cube.png"}}),
                {link:"http://eudock.jules.it"});
   dock.addIcon(new Array({euImage:{image:"iconsEuDock/cube.png"}}),
                {link:"http://eudock.jules.it"});
</script>



MMMMM... It's a better idea to explain these functions:


<script>
      /*
       * This is useful for Internet Explorer PNG compatibility
       * "js/" is the euDock javascript basePath
       */
   euEnv.imageBasePath="js/";

   
      //In variable (dock) now there is an euDock object
   var dock = new euDock();

   
      /*
       * To define (unnecessary) the background Dock Bar:
       *
       * (euDock object).setBar({
       *        left      :[-(object definition for left background bar icon)-],
       *        horizontal:[-(object definition for center horizontal background bar icon)-],
       *        right     :[-(object definition for right background bar icon)-]
       *      });                                                      
       *
       * euImage is the euImage Object inside the "euDock.Image.js" script
       * the common constructor is:
       *
       *    {euImage:{image:[-(image name)-]}}
       */
   dock.setBar({
        left      :{euImage:{image:"barImages/dockBg-l.png"}},
        horizontal:{euImage:{image:"barImages/dockBg-c-o.gif"}},
        right     :{euImage:{image:"barImages/dockBg-r.png"}}
     });

      /*
       * (unnecessary)
       *
       * (euDock object).setIconsOffset(offset);
       *
       * offset:the distance between base align bar and the base align icons
       * default is 0
       */
   dock.setIconsOffset(2);

      /*
       * (unnecessary)(if you want to see nothing of course)
       *
       * (euDock object).addIcon(arrayOfObjects,iconParameters);
       *
       * arrayOfObjects : in this case there is an euImage array of 1 element
       * iconParameters : "link" is the url where you want to go
       */
   dock.addIcon(new Array({euImage:{image:"iconsEuDock/cube.png"}}),
                {link:"http://eudock.jules.it"});

   
      /*
       * Repeat the last command if you want more icons
       */
</script>



REMEMBER
Don't forget to put in your page:


<a href='http://eudock.jules.it'>
<img src='http://eudock.jules.it/littlEuDock.jpg' border=0></a>





!!!If you don't like (of course) a personal Macumba!!!



RETURN TO INDEX






           
       
eudock2.0.zip( 352 k)