Jump to content

Need a popup code that can run like popup();


jsaknow

Recommended Posts

I have search the forum, but i cant find something thats about my problem.. :S

 

Im trying to make a kind of a community website for my friends and others who want to be there.. (Its danish)..

I got alot of stuff going in the codes, and now i want some kind of a popup to tell the user when they got a new msg, i trying alot of stuff but i cant find something that works with my codes..

 

...

 

I got 2 iframes in the background running to update user status and stuff, i want one of them to create a popup when a new msg is in for the Session user..

 

 

 

This is one of the update pages i got running..

<script>
setTimeout("document.location.reload(true);", 60000);
</script>
<head>

<link rel="stylesheet" type="text/css" href="style_blue.css">
</head>
<?
require_once('#####.php'); //database access
require_once('#####.php'); // php functions
session_start();

if (isset($_SESSION['user']) AND ($_SESSION['user'] <> ''))
{
$result = mysql_query("UPDATE users SET time = '".time()."' WHERE id = '$_SESSION[id]'");
}

$result2 = mysql_query("SELECT id FROM msg WHERE to = '$_SESSION[id]' AND new = '1'");
$antal2 = ( mysql_num_rows($result2) );

if (($antal2 > '0'))
{
	## Here i need a code to create a popup telling the user that there is a new msg..
}

?>

 

I really hope someone can help me... :S

Btw.. i dont wanna use alert popup cuz then they will stack if a user goes out for a few hours but stays on website..

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.