so far I have:
Code: Select all
<!-- THIS SECTION CREATES TWO HIDDEN TABLES WITH THE ID's 'Test', 'Test 1'-->
<?php
$a = 0;
foreach($sqDBArray AS $sq){
print "<div id=\"$sq\" style=\"position:absolute; left:50%; top:50%; display:none;\">\n";
print " <table style=\"width:400px; position:relative; left:-200px; top:-110px; background-color:$sqCol; padding:10px; z-index:2\">\n";
print " <tr>\n";
print " <th class=\"Round\" style=\"vertical-align:middle; height:300px;\">";
print $sq;
print " </th>\n";
print " </tr>\n";
print " </table>\n";
print "</div>\n";
$a++;
};
?>
<script type="text/javascript">
<!-- CREATE JAVASCRIPT ARRAY -->
var dbArray = ['<?php print str_replace(",","','",$sqDB); ?>'];
//This creates an Array like dbArray=['test','test 1'];
<!-- SHOW / HIDE WINDOW FUNCTIONS -->
function hide(id)
{
document.getElementById(id).style.display='none';
}
function show(id)
{
document.getElementById(id).style.display='block';
setTimeout('hide();', 5000); // 5 seconds
}
for (i=0; i<dbArray; i++)
{
show(dbArray[i]);
//document.write(dbArray[i]);
}
</script>