Wednesday 15 June 2011

php - User Notification Library -


I am currently looking for a user notification library php / javascript which will allow a user to run a specific process ( Say that for some databases) and then allow them to continue the site and finally send them a pop up message when the process is complete. Thus a user can continue to use a particular site without waiting for a query without having to wait. I have examined some such libraries on this, but I do not know what it is actually described after reading me. Please tell me any idea or if this library which I have mentioned can do. Thank you in advance.

Any other can provide you with links to a great library, but I will go ahead and say that You can do this with AJAX Javascript can send a request to the server for a PHP file, for example, can add something to the database again, because it is asynchronous, the user can keep browsing and the AJAX stuff is not maintained until the javascript stuff is kept, At that time the callback function will take place, and you can keep a small space of the javascript code to notify the user that the process has been done.

  function addToDatabase (whatToAdd) {var xmlhttp; If (window.XMLHttpRequest) {// code for IE7 +, Firefox, Chrome, Opera, Safari xmlhttp = New XMLHttpRequest (); } Else {// code for IE6, IE5 xmlhttp = new ActiveXObject ("Microsoft.XMLHTTP"); } Xmlhttp.onreadystatechange = function () {informate the user with the result by using {xmlhttp.readyat == 4 & xmlhttp.status == 200} {// xmlhttp.responseText}} XMLhttp.open (" GET ","? AddToDatabase.php TOADD = "+ whatToAdd, true); Xmlhttp.send (); }   

You know, something like that

No comments:

Post a Comment