Hi
I am trying to use some simple AJAX call, and can't get right result.
I am using this Javascript function:
function filterMarkers(){
var request = GXmlHttp.create();
request.open('GET', '/lbs/' + "?q=placeholder, true);
request.onreadystatechange = function() {
if (request.readyState == 4) {
// var xmlDoc = request.responseXML;
alert("ok");
}
}
request.send(null);
return false;
}
GXmlHttp is just XmlHttpRequest.
When I click submit on my form, alert box popup, and everything is ok,
django view process normally, but after that I get response from
server, instead of doing nothing, not refreshing, I get hello world
response. How can I catch response i order to have unmodified page
from which I call for request?
My view is something like this:
def map(request):
q = request.GET.get("q", "")
if q:
return HttpResponse("Hello world")
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---