|
Post by Kenshin on May 13, 2005 15:14:11 GMT -8
Tutorial: - Adding Something To the top/bottom of your PB Forum
I will explain this whole tutorial by using one of the Codes I've made for Proboardsv4
First we ad a div with an id to the header/footer(We will use this to help us place what we want where we want header[if u want it at the top] or footer[if you want it at the bottom of your board])
<div id='InfoCenter'> </div>
So you see? Now you close the div and thats it for this part!
<script type="text/javascript"> <!--
we start the script... Now we grab a table and then loop it...
Table = document.getElementsByTagName('Table'); for(i=0;i<Table.length;i++){
You should have something like that now. Now we match to the table(or something else depending on what you want) of the info center:
if(Table[i].className=="bordercolor" && Table[i].innerHTML.match(/Info Center/i)){
So we've matched to the info center! Now we save the info center table by putting its innerHTML value in a variable like this:
var iCenter = Table[i].innerHTML;
Now we remove the thing that were moving(or you could keep it there...your choice) by hiding/deleting it:
Table[i].style.display='none'
Now its hidden. Finally this is where the div id comes in...We grab the Id and make the innerHTML of the id our variable that was holding the info center:
document.getElementById('InfoCenter').innerHTML = iCenter;
now we end the script
//--> </script>
and there you have it
Last Edit: May 13, 2005 15:15:17 GMT -8 by Kenshin
|
|