Logo Branding

Any problem with javascript can be discussed here.
Post Reply
coco
Posts: 50
Joined: Thu Dec 23, 2004 12:01 pm
Contact:

Logo Branding

Post by coco »

Have you seen the floating logo on the Geocities site? How would you like to have your logo floating in the corner of the site? This script does just that!

<!-- THREE STEPS TO INSTALL LOGO BRANDING:

1. Insert the first code into the HEAD of your HTML ****
2. Add the onLoad event handler to the BODY tag
3. the last code into the BODY of your HTML **** -->



<head>

<script type="text/javascript" language="JavaScript">
<!-- Begin
function setVariables() {
imgwidth=235; // logo width, in pixels
imgheight=19; // logo height, in pixels
if (navigator.appName == "Netscape") {
horz=".left";
vert=".top";
docStyle="****.";
styleDoc="";
innerW="window.innerWidth";
innerH="window.innerHeight";
offsetX="window.pageXOffset";
offsetY="window.pageYOffset";
}
else {
horz=".pixelLeft";
vert=".pixelTop";
docStyle="";
styleDoc=".style";
innerW="****.body.clientWidth";
innerH="****.body.clientHeight";
offsetX="****.body.scrollLeft";
offsetY="****.body.scrollTop";
}
}
function checkLocation() {
objectXY="branding";
var availableX=eval(innerW);
var availableY=eval(innerH);
var currentX=eval(offsetX);
var currentY=eval(offsetY);
x=availableX-(imgwidth+30)+currentX;
y=availableY-(imgheight+20)+currentY;
evalMove();
setTimeout("checkLocation()",10);
}
function evalMove() {
eval(docStyle + objectXY + styleDoc + horz + "=" + x);
eval(docStyle + objectXY + styleDoc + vert + "=" + y);
}
// End -->
</script>

</head>



<body onload="setVariables(); checkLocation();">



<div id="branding" style="position:absolute; visibility:show; left:235px; top:-50px; z-index:2">
<table width="10" bgcolor="#ffffff"><td>
Image</td>
</table>
</div>

</body>


shanker
Posts: 44
Joined: Fri Mar 04, 2005 5:05 pm

Post by shanker »

lolz, whats the point of submitting java scripts code u find on the internet? i can find the script u posted here and many more on decent sites like http://www.dynamicdrive.com

comme on pplz, write some new scripts and show off what u gotz man
toychoq
Posts: 108
Joined: Fri Apr 15, 2005 9:11 am

Post by toychoq »

Nice job

Can get on with it
why logo branding are there any commercila sites
kaos_frack
Posts: 504
Joined: Sat May 07, 2005 8:03 am
Contact:

Post by kaos_frack »

cool
but i could not understand javascipt, lol
Post Reply