Post by Simpsons Rule on Dec 7, 2003 18:03:57 GMT -5
To make an image appear instead of a different color when you place the mouse over a Board, or thread, use this code. Just as in the regular Cell Highlight code, this goes in your Footers and must be the first thing in your Footers. Remove the URL link in the code and replace it with the URL of your image. I recomend using .jpeg or .gif images since .bmp take too long to load.
<SCRIPT LANGUAGE="JavaScript">
<!--
/*
Copyright © 2003 ProBoards.com
All Rights Reserved
Permission is hereby granted to use this code
solely on message boards hosted by ProBoards.com.
Any other site found to be using this code shall
be in violation of this copyright notice.
*/
// Color for when the user puts their mouse over the board
var mouseOverColor = '757575';
var statusMessage = '';
window.status = statusMessage;
tables = document.getElementsByTagName('TABLE');
for(t=0;t<tables.length;t++)
for(r=0;r<tables[t].rows.length; r++)
for (c=0;c<tables[t].rows(r).cells.length; c++)
if((tables[t].rows(r).cells(c).className=="windowbg2" && tables[t].rows(r).cells(c).width=="66%") || (tables[t].rows(r).cells(c).className=="windowbg" && tables[t].rows(r).cells(c).width=="48%")) {
tables[t].rows(r).cells(c).onmouseover = function(){this.style.cursor='hand';this.background='http:// www. THEIMAGEHERE.jpg';window.status = (this.id.split('|'))[1];};
tables[t].rows(r).cells(c).onmouseout = function(){this.background='';window.status=statusMessage};
if(tables[t].rows(r).cells(c).innerHTML.match(/href="(.+?)"><B>(.+?)</)) {
if(RegExp.$1 != 0) {
tables[t].rows(r).cells(c).id=RegExp.$1+'|'+RegExp.$2;
tables[t].rows(r).cells(c).onclick = function(){location.href=(this.id.split('|'))[0];};
}
}
}
// -->
</script>
Add this to your Header as well:
<style>
<!--
.bordercolor {background-color: transparent;}
-->
</style>
<SCRIPT LANGUAGE="JavaScript">
<!--
/*
Copyright © 2003 ProBoards.com
All Rights Reserved
Permission is hereby granted to use this code
solely on message boards hosted by ProBoards.com.
Any other site found to be using this code shall
be in violation of this copyright notice.
*/
// Color for when the user puts their mouse over the board
var mouseOverColor = '757575';
var statusMessage = '';
window.status = statusMessage;
tables = document.getElementsByTagName('TABLE');
for(t=0;t<tables.length;t++)
for(r=0;r<tables[t].rows.length; r++)
for (c=0;c<tables[t].rows(r).cells.length; c++)
if((tables[t].rows(r).cells(c).className=="windowbg2" && tables[t].rows(r).cells(c).width=="66%") || (tables[t].rows(r).cells(c).className=="windowbg" && tables[t].rows(r).cells(c).width=="48%")) {
tables[t].rows(r).cells(c).onmouseover = function(){this.style.cursor='hand';this.background='http:// www. THEIMAGEHERE.jpg';window.status = (this.id.split('|'))[1];};
tables[t].rows(r).cells(c).onmouseout = function(){this.background='';window.status=statusMessage};
if(tables[t].rows(r).cells(c).innerHTML.match(/href="(.+?)"><B>(.+?)</)) {
if(RegExp.$1 != 0) {
tables[t].rows(r).cells(c).id=RegExp.$1+'|'+RegExp.$2;
tables[t].rows(r).cells(c).onclick = function(){location.href=(this.id.split('|'))[0];};
}
}
}
// -->
</script>
Add this to your Header as well:
<style>
<!--
.bordercolor {background-color: transparent;}
-->
</style>