Here a some more html tricks I know
//Add to favorites
//Pop up windows
//Back in history
//random banner
cheers,
mike
//Add to favorites
Code:
<a href="javascript:window.external.AddFavorite(document.location, document.title)"><font type=Trebuchet MS" size=2 color="#000000">add to favorties</font></a>
//Pop up windows
Code:
<head>
<script>
function myPopUp(){
tehpop=window.open('http://www.wtflash.com/siteerror404','',CONFIG='HEIGHT=500,WIDTH=500,TOOLBAR=no,MENUBAR=no,SCROLLBARS=no,RESIZABLE=no,LOCATION=no,DIRECTORIES=no,STATUS=no')
}
</script>
</head>
<a href="javascript:myPopUp()"><font type="Trebuchet MS" size=2 color="#000000">link text</font></a>
//Back in history
Code:
javascript:history.go(-1)
//random banner
Code:
<SCRIPT LANGUAGE="JavaScript">
<!--
var ad = 0;
ad = Math.floor(Math.random()*4);
if (ad==0) {
url="http://www.yoursite.com
alt="alt text";
banner="www.yoursite.com/locationOFbanner";
width="425";
height="65";
}
if (ad==1) {
url="http://www.othersite.com
alt="alt text";
banner="www.othersite.com/locationOFbanner";
width="425";
height="65";
}
if (ad==2) {
url="http://www.othersite.com
alt="alt text";
banner="www.othersite.com/locationOFbanner";
width="425";
height="65";
}
if (ad==3) {
url="http://www.othersite.com
alt="alt text";
banner="www.othersite.com/locationOFbanner";
width="425";
height="65";
}
//If one of the banners was at your own site
if (ad==0) {
document.write('<a href=\"' + url + '\" target=\"_top\">');
}
if (ad>=1) {
document.write('<a href=\"' + url + '\" target=\"_blank\">');
}
document.write('<img src=\"' + banner + '\" width=');
document.write(width + ' height=' + height + ' ');
document.write('alt=\"' + alt + '\" border=0></a>');
// -->
</SCRIPT>
cheers,
mike