I have a django application already developed which I'm trying to use to experiment with asynchronous javascript without using any of the standard JQuery type libraries, in order to better learn and understand AJAX concepts. The application itself has been written using python 2.7.1 and django 1.2.4. My view just returns the "request.responseText" from the asynchronous javascript call returns text only from a django view (via "return HttpResponse(message)"). I would try to use the "render_to_response()" shortcut function, but then it doesn't seem like the javascript callback function would be needed or used, so I hesitate to do so. I would like to display the returned text data on a new non-modal popup screen (using window.open()) so that the user can view it, while still interacting with the main screen, from which the asynchronous javascript call was originally issued. However when I initiate the asynchronous call and the popup is displayed I'm getting a 404, because apparently the url that I'm supplying for the popup is in error in some way. The 404 verbage returned in the popup looks like this:
Page not found (404)
Request Method:
GET
Request URL:
http://127.0.0.1:8000/mediahelp/mediaHelpPopup.html
Using the URLconf defined in streamingmedia.urls, Django tried these URL patterns, in this order:
1.^mymedia/
2.^mediaadmin/
3.^mediahelp/ ^$
4.^mediahelp/ ^comphelp/$
5.^admin/
So is there a problem with the url used above(the href field in the popup function)? If so what's wrong with it? Previously the call seemed to be successfull as well as the return, since I was previously able to display the returned message in an alert. So I wanted to actually display the returned data in a popup window, which is my ultimate goal and that is where things stand so far in my progress, up to the point to where I started getting the current 404 situation that you now see above. Thanks for the help.
Thanks for the help. You revealed some things to me which I hadn't understood or tried before, but now I have. The 404 problem has been resolved and things are working much better. Thanks again.