Hello,
I have some Javascript that i want to call when the PHP $SESSION[id] is set.
I have tried this and have had no result:
<?
if(isset($_SESSION[‘id’]))
{
echo “<script type=’text/javascript’>
adminbarheaderloggedinevencountdown.style.visibility==’visible’;
underadminbarquicklinks.style.paddingTop==’30px’;
document.getElementById(‘logintab’).innerHTML == ‘Log Out’;
document.getElementById(‘loginorregisterkeyseperator’).innerHTML= = ”;
document.getElementById(‘registerkey’).innerHTML == ”;
document.getElementById(‘logintab’).onclick ==
function(){adminbarheaderloggedout();}
alert(‘You will now be shown as LOGGED IN. Please Note: this is a DEMO’);
</script>”;
}
?>
the javascript i wish to run is:
<script type=’text/javascript’>
adminbarheaderloggedinevencountdown.style.visibility==’visible’;
underadminbarquicklinks.style.paddingTop==’30px’;
document.getElementById(‘logintab’).innerHTML == ‘Log Out’;
document.getElementById(‘loginorregisterkeyseperator’).innerHTML= = ”;
document.getElementById(‘registerkey’).innerHTML == ”;
document.getElementById(‘logintab’).onclick ==
function(){adminbarheaderloggedout();}
alert(‘You will now be shown as LOGGED IN. Please Note: this is a DEMO’);
</script>
I would be extremely grateful if someone could help me with this as i have tried many things over the past few days and non have worked.
Many Thanks