Need help with jquery/javascript setInterval
<p>Currently im developing a user notification alert message function.</p>

<p>I managed to use setInterval to control my Ajax call (to check if there's any notifcation msg for the user). But my problem is that I only wanted the notfication message only 
appear once on the page (Now it displays multiple notification alert msg on the screen). </p>

<p>I know that you can us setTimeout to make it only call once but I also needed the page to check
if there's a new notifcation message alert in every 5min.</p>

<p>Second question is it possible the first round calling the Ajax call instantly n then all other calls every 5min? because I wanted the system to check instantly once they logged into the system n then afterward every 5min.</p>

<p>Thanks so much in advance!</p>

<p>Here is my code</p>

<pre><code>       &lt;script type = "text/javascript"&gt;

                function getAjaxNotice()
                    {
                             $.post("/async/getnotification" , {},
                             function(response)
                             {
                                var notice = $(response);

                                $("#notices").prepend(notice);
                             });
                              return false;

                    }

                    setInterval( "getAjaxNotice()", 50000 );


                        &lt;/script&gt;
</code></pre>
