ok here is a link to were the code is being used...
joeskingdom.proboards.comyou can log in using the account
nightwalker
P-word: testing
here is the main JS part of the code
I want it to be so that if you DO NOT have a PM then the bar will go down to 3px tall. When the bar is 3px tall the text should hide itself. When you put your mouse over the 3px bar it comes back to 45px and the text comes back. It works a little like the toolbar at the bottom of windows computers
if( new_pms != "0" && pb_username != "Guest" ){
document.getElementById("pmmm").style.display="block";
var pmbb = "<center>Hello "+pb_displayname+" you have <a href='/index.cgi?action=pm'>"+new_pms+"</a> new PM's</center>";
document.getElementById("pmmm").innerHTML = pmbb;
}
That is the part of the code that runs when you do have a PM. I want this part to not get small but stay out at all times.
if( new_pms == "0" && pb_username != "Guest" ){
document.getElementById("pmmm").style.display="block";
var pmbb = "<center>Hello "+pb_displayname+" you have <a href='/index.cgi?action=pm'><font color='238d8d'>"+new_pms+"</font></a> new PM's</center><br /><center>[<a href='/index.cgi?action=viewprofile'><font color='238d8d'>View Profile</font></a> | <a href='/index.cgi?action=modifyprofile&user= "+pb_username+" '><font color='238d8d'>Modify Profile</font></a>]</center>";
}
This is the part that should get small
BTW the code on the test site is updated so just look at the one i gave you here i can fix it with the update later
<script type="text/javascript">
var vfiPB=document.getElementsByTagName("td");
if( pb_username == "admin" ){
if(vfiPB[2].innerHTML.match(/action=pm">(\d+)\s/i)) {
var total_pms = RegExp.$1
}
if(vfiPB[2].innerHTML.match(/, (\d+)\ (are|is) new./i)){
var new_pms = RegExp.$1
}
if( new_pms != "0" && pb_username != "Guest" ){
document.getElementById("pmmm").style.display="block";
var pmbb = "<center>Hello "+pb_displayname+" you have <a href='/index.cgi?action=pm'>"+new_pms+"</a> new PM's</center>";
document.getElementById("pmmm").innerHTML = pmbb;
}
if( new_pms == "0" && pb_username != "Guest" ){
document.getElementById("pmmm").style.display="block";
var pmbb = "<center>Hello "+pb_displayname+" you have <a href='/index.cgi?action=pm'><font color='238d8d'>"+new_pms+"</font></a> new PM's</center><br /><center>[<a href='/index.cgi?action=viewprofile'><font color='238d8d'>View Profile</font></a> | <a href='/index.cgi?action=modifyprofile&user= "+pb_username+" '><font color='238d8d'>Modify Profile</font></a>]</center>";
document.getElementById("pmmm").innerHTML = pmbb;
}
}
</script>