views:

46

answers:

1

for example when you get a new badge on stack overflow, you get the notifaction message on the top, telling you have a new badge, it deos that on the backgroung!! is thier a toturial or article that can help me with this kind eventing updates!!

A: 

You should look into notifications such as jGrowl. The site has some samples to help you get going :)

EDIT

How will you be storing notifications? Within a DB? I will get back to you later - My lunch break is over for now :(

EDIT 2

Here is a basic example of how to get it working with php by declaring an array of messages which you could easily populate from a database. You could make this more advanced by using the other options offered by jGrowl such as stickies etc by using a multidimentional array to store such options and outputting the correct javascript.

<?php

$messages = array("This is a message", "And this is another", "etc...");

?>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>jGrowl and PHP Test</title>
        <link type="text/css" rel="stylesheet" href="jquery.jgrowl.css" />
        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"&gt;&lt;/script&gt;
        <script type="text/javascript" src="jquery.jgrowl.js"></script>
        <script type="text/javascript">
            $(document).ready(function() {

            <?php foreach ($messages as $message) { ?>
                $.jGrowl("<?php echo $message; ?>", { life: 3000 });
               <?php } ?>

        });
    </script>
</head>
<body>

</body>

Malachi
cheers! thank you
getaway
this deosnt help with communicating with php, in terms of eventing system!! :)))
getaway