$. ajax is not working properly using jquery mobile framework ...
it just allows us to upload an html file ....
if we want to call "ActionMethod", then it does not work:
$.ajax({
url:'Home/CallMe',
success: function(result) {
alert(result);
}
});
It hangs by the system ...
I am using an iPhone emulator for testing ....
Can someone tell me why the above does not work and why the below works when using the jQuery mobile framework?
$
.ajax({
url:'htmlFile.htm',
success: function(result) {
alert(result);
}
});
Edited: Another thing I want to tell you is that I use ASP.NET MVC ...
Edited:
The simplest example of an action method that you can try:
public JsonResult CallMe()
{
return Json("I'm your response");
}
[HttpPost] can also be applied if you want ...
source
share