Location: PHPKode > projects > MyPBS > mypbs/frontend/helplibrary.php
<?php
### To call the javascript/css place popupscript() in the head of the html part of the file
### To place a help button on the page insert helpitem($one); the variable $one refers to the help string
### these help strings are at the bottom of this file.

function popupscript(){
echo"
<script type=\"text/JavaScript\" language=\"javascript\">
<!--                        
var objPopUp = null;                        
function popUp(event,objectID) {                                
objPopTrig = document.getElementById(event);                                
objPopUp = document.getElementById(objectID);                                
xPos = objPopTrig.offsetLeft;                                
yPos = objPopTrig.offsetTop + objPopTrig.offsetHeight;

                                if (xPos + objPopUp.offsetWidth >  document.body.clientWidth) xPos = xPos - objPopUp.offsetWidth;
                                if (yPos + objPopUp.offsetHeight >  document.body.clientHeight) yPos = yPos - objPopUp.offsetHeight - objPopTrig.offsetHeight;
                                objPopUp.style.left = xPos + 'px';
                                objPopUp.style.top = yPos + 'px';
                                objPopUp.style.visibility = 'visible';
                        }

                        function popHide() {
                                objPopUp.style.visibility = 'hidden';
                                objPopUp = null;
                        }
//-->
</script>




<style type=\"text/css\" media=\"screen\">

<!--
.popUp{
        font-size: 10px;
        background-color: #ffffcc;
        visibility: hidden;
        margin 0 10px;
        padding: 5px;
        position: absolute;
        width: 228px;
        border: solid 1px black;
}

table.help{
        border-width: 0px;
        border: 1px solid #E47833;
        border-spacing: 0px;
        border-collapse: collapse;
        font-family: arial;
        font-size: 10px;
        background-color: #999999;
}

#help a:link{
        font-family:  Copperplate, Arial, sans-serif;
        font-size: 14px;
        color: #000000;
        text-decoration: none;
        whitespace: no-wrap;
}

#help a:visited {
        font-family:  Copperplate, Arial, sans-serif;
        font-size: 14px;
        color: #000000;
        text-decoration: none;
}

#help a:hover {
        font-family:  Copperplate, Arial, sans-serif;
        font-size: 14px;
        color: #FFFFFF;
        text-decoration: none;
}

#help a:active {
        font-family:  Copperplate, Arial, sans-serif;
        font-size: 14px;
        color: #CCCCCC;
        text-decoration: none;
}

-->
</style>
";

}

function helpitem($string) {
static $popid = 1;
echo"
<table class=\"help\" id=\"help\">
<tr>
<td>
<a id=\"pop1\" onClick=\"popUp(this.id, 'popUp$popid')\" href=\"#\">?</a>
</td>
</tr>
</table>
<br>
<div id=\"popUp$popid\" class=\"popUp\">
$string
<br>
<a href=\"#\" onClick=\"popHide()\">close me</a>
</div>
";
$popid++;

}






$one="you know what's going down.";
$two="two.";
$three="three.";













?>
Return current item: MyPBS