Manz16
04-24-2008, 12:15 PM
Is there a html script to display something only once?
i have a popup box appearing on a forum when you recieve a new private message, saying click on OK to view it or cancel, i added the code in my header so that it comes up on any page you go on, whenever you click on cancel it keeps comming up on any page you go on, but when you click on OK, it goes to your PM inbox.
Is there a way to make this message box appear only once? with html?
this is the code that i am using
<script language="javascript" type="text/javascript">
<!--
if( {PRIVATE_MESSAGE_NEW_COUNT} >0 )
{
new_pm_prompt = confirm('A new private message is waiting for you in your Inbox. Click OK to view it.');
if(new_pm_prompt == true) {
// Redirect to Inbox if OK is clicked
window.location = 'privmsg.php?folder=inbox';
}
else {
// Close prompt if cancel is clicked
}
}
//-->
</script>
any help would be appreciated.
thanks
i have a popup box appearing on a forum when you recieve a new private message, saying click on OK to view it or cancel, i added the code in my header so that it comes up on any page you go on, whenever you click on cancel it keeps comming up on any page you go on, but when you click on OK, it goes to your PM inbox.
Is there a way to make this message box appear only once? with html?
this is the code that i am using
<script language="javascript" type="text/javascript">
<!--
if( {PRIVATE_MESSAGE_NEW_COUNT} >0 )
{
new_pm_prompt = confirm('A new private message is waiting for you in your Inbox. Click OK to view it.');
if(new_pm_prompt == true) {
// Redirect to Inbox if OK is clicked
window.location = 'privmsg.php?folder=inbox';
}
else {
// Close prompt if cancel is clicked
}
}
//-->
</script>
any help would be appreciated.
thanks