realtime data updation in cakephp or php
i am working on a Cakephp 2.x .
I have a loader/spinner on my view page which is waiting for a response
from user's mobile device. Unfortunately i'm compeletly blank on how to
get the request from mobile device, and update the page content real time.
here is the function
<script>
var cancelled = true;
$.modal.prompt('Enter message :', function(value)
{
$.ajax({
type:"POST",
data:{value:value},
url:"/cakephp/api/getData/",
success : function(data) {
//i am starting the spinner here ..
here i want to get the value from an android device ..as soon as i
receive the value i want to stop the spinner
},
error : function() {
alert("error");
}
});
}, function()
{
});
};
how can i do this?
No comments:
Post a Comment