<script>
            $(document).ready(function(){
                Notifications();  // this will call only one time thats
first body load time
                setInterval("Notifications()", 5000);  // this will call
each 5000ms
                //60000
            });
            function Notifications(){
                //alert("Notify");
                $.ajax({
                    url: "testtt.php",
                    success: function(data){
                        var test=eval(data);
                        $("#dii").empty();
                        for(i=0;i<test.length;i++){

                            $("#dii").append("<b>"+test[i]['name']+"</b>");
                            $("#dii").append(":");
                            $("#dii").append(test[i]['post']);
                            $("#dii").append("<br />");

                        }
                    }
                });
            }
        </script>


here Notifications() function will call each 5000ms you can get ajax request
from the url you given ... let me know if you have any doubt .




---------------------------------------------------------


Miqdad Ali K
+919995258790
http://www.miqdadalik.com




On Wed, Oct 12, 2011 at 10:59 PM, Anna P <[email protected]> wrote:

> system

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to