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..

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.