$.ajax not works properly by using jquery mobile framework...
it just let us downoad html file....
if we want to call 'ActionMethod' then it not works:
$.ajax({
url:'Home/CallMe',
success: function(result) {
alert(result);
} // edited
});
It hangs the system...
I'm using IPhone Emulator for testing....
Can anyone let me know why above not works and why below works while using jquery mobile framework?
$
.ajax({
url:'htmlFile.htm',
success: function(result) {
alert(result);
} // this line is edited later
});
Edited: One another thing I want to tell you is that I'm using ASP.NET MVC...
Edited:
A simplest example of action method that you can try is:
public JsonResult CallMe()
{
return Json("I'm your response");
}
[HttpPost] can also be applied, if you want...