AJAX and Django using the polls app from the tutorial: 2 problems
This is a frequent mistake when writing JavaScript. You haven't disabled the default actions on click or submit. This means that the JS execute, calling the ajax, but then immediately the normal browser submit is also executed, causing a refresh.
voteBehavior should accept an event parameter, and you should call event.preventDefault() at the start of the function.
I'm a newbie here, and much of what I have learned about django and python have come from this website.  Thank you all for being so helpful!  This is my first question post.
I've got 2 problems as I try to extend what I've learned from the Django tutorial (1.6) and try to get the Polls app to load via AJAX.  I want to use the main mysite app as a home page, and pull in content from other apps in the mysite project using ajax.  The tutorial doesn't really cover integrating content from different apps on a single page.
I have 2 ajax elements already working on the main mysite page (a "trick or treat" button that retrieves some silly text, and a small dns lookup form/button) but those are part of the mysite app, so all of the logic is handled using the mysite app urlconf, views and templates.
There is another div on the page which is for a "Featured App" that will get pulled in, also via ajax.  Basically, mysite.views builds a list of apps that have a 'ajaxFeaturedAppView', and then chooses one at random to display in the "Featured App" section on the mysite page. This is my novice attempt at decoupling the mysite app from the other apps as much as possible.
Problem 1)  The initial poll question and choices and vote button all appear correctly on page load, but the vote button just loads another poll question.  It should display poll results.
Problem 2)  The other ajax elements on the page get triggered when I hit the Vote button, also.  I think this is because the Vote button action triggers the document ready() event, which initializes the ajax elements.  But the other ajax elements don't do that; they do not trigger the document ready() event.
I think that it may be one problem with two symptoms, actually.  So, how do I get the vote button to not trigger a document ready event, and will that allow me to see the poll results?  Or am I doing something else wrong?  
EDIT: 
Okay, there were a few problems with that pieced-together code.  Thanks for the help.