Jump to content

How to create this webpage


freshboy

Recommended Posts

hi..i think the page contain little php code..that is why the extension is .php..otherwise most of the thing is done in javascript...u see the code u will find this kid of code which says that it uses javascript and CSS <script src="includes/js/default_js.js" language="Javascript"></script><script src="templates/acidgreen/ypSlideOutMenusC.js" type="" language="JavaScript"></script><script src="templates/acidgreen/bgsleight.js" type="" language="JavaScript"></script><script src="templates/acidgreen/slider_home.js" type="" language="JavaScript"></script><style type="text/css" media="all">@import url("templates/acidgreen/default.css");</style><style type="text/css" media="all">@import url("templates/acidgreen/home.css");</style>

Link to comment
Share on other sites

first, they use a small code to verify if the DOM (see w3schools.com to learn about it) of the browser can handle Layers,

<script type="text/javascript">if (!document.layers)document.write('<div id="divStayTopLeft" style="position:absolute">')</script>

then they used the following script to do the magic:

    <script type="text/javascript">       	 /*   	 Floating Menu script-  Roy Whittle (http://www.javascript-fx.com/) Script featured on/available at http://www.dynamicdrive.com/   	 This notice must stay intact for use   	 */   	 //Enter "frombottom" or "fromtop"   	 var verticalpos="frombottom"     	 if (!document.layers)      document.write('</div>')     	 function JSFX_FloatTopDiv()   	 {      var startX = document.body.clientWidth - 30,     	 startY = 92;      var ns = (navigator.appName.indexOf("Netscape") != -1);      var d = document;   	       function ml(id)      {     	 var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];     	 if(d.layers)el.style=el;     	 el.sP=function(x,y){this.style.left=x;this.style.top=y;};     	 el.x = startX;     	 if (verticalpos=="fromtop")     	 el.y = startY;     	 else{     	 el.y = ns ? pageYOffset + innerHeight : document.body.scrollTop + document.body.clientHeight;     	 el.y -= startY;     	 }     	 return el;      }      window.stayTopLeft=function() {     	 if (verticalpos=="fromtop"){     	 var pY = ns ? pageYOffset : document.body.scrollTop;     	 ftlObj.y += (pY + startY - ftlObj.y)/8;     	 }     	 else{     	 var pY = ns ? pageYOffset + innerHeight : document.body.scrollTop + document.body.clientHeight;     	 ftlObj.y += (pY - startY - ftlObj.y)/8;     	 }     	 ftlObj.sP(ftlObj.x, ftlObj.y);     	 setTimeout("stayTopLeft()", 10);      }      ftlObj = ml("divStayTopLeft");      stayTopLeft();   	 }   	 JSFX_FloatTopDiv();   	     </script>

good luck :) hope i helped

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...