Using insertRow and insertCell
------------------------------
To understand this tutorial you must understand the basics of javascript as
well as some other things
Im assuming that you understand variables and some other things
The best way to teach this is to look at a code and break it down for you
Lets take my PM bar code for example
Lets skip down to the part where we actually insert a row
var pmBar = document.getElementsByTagName("table")[0].insertRow(0)
Ok First we are declaring a variable 'pmBar' then we obviously need to get
the table so we use 'document.getElementsByTagName("table")[0]' , we use
table because thats our tag we're looking for, the 0 means that thats the
place we want to edit then '.insertRow(0)' ok this is the actual adding of
the row again we put 0 because thats the place we want it
Now For the next line
var pmCell = pmBar.insertCell(0)
Declare Variable, we put pmBar because thats where we inserting the cell and
since this is the only cell in this row we put (0)
Lets take this and make a code that adds a row to the bottom of your menu
that Has a simple message on it
<script>
var wBar = document.getElementsByTagName("table")[3].insertRow(1)
var wCell = wBar.insertCell(0)
wCell.className="catbg"
wCell.innerHTML= "<center>Welcome</center>"
</script>
All I added was the catbg and the innerHTML which is what writes on the bar
I hope this helped you
Tutorial By: Deprived