/*
	MS (2007-03-27)
	This processes the poll's requests and passes them, via the prototype js lib,
	to the relevant function in the poll.py view.

*/

function processPoll(poll_id){

	poll_choice = document.frmPoll.choice;

	alert("poll choice: \n\n" + poll_choice + "\n\n");

	new Ajax.Request('/polls/ajax/'+poll_id+'/vote/',
	  {
		method:'get',
		onSuccess: function(transport){
		  var response = transport.responseText || "no response text";
		  alert("Success! \n\n" + response);
		},
		onFailure: function(){ alert('Something went wrong...'); }
	  });

}// end function




