real time messages for my project

78 views Asked by At
$(".update_button").click(function() 
{
  var updateval = $("#update").val();
var dataString = 'update='+ updateval;
if(updateval=='')
{
alertify.alert("Please Enter Some Text!");
}
else
{
$("#flashing").show();
$("#flashing").fadeIn(3000).html('<img src=../images/ajax-loader.gif>');
$.ajax({
type: "POST",
url: "message_ajax.php",
data: dataString,
cache: false,
success: function(html)
{
$("#flashing").fadeOut('slow');
$("#loadcontainer").prepend(html);
$("#update").val('');   
$("#update").focus();

  }
 });
}
return false;
    });

i want the other users who are friend to the message sender to get alert after the above which actually append the new post on the message sender page only but not his/her friends.Is there simpler way than Comet or Long-polling?

0

There are 0 answers