Newbie needs help with js & ajax

I have a selection list on my main.php page (schoolYearSwitcher) that allows a user to change school year. I register js as follows




<?php 

$this->registerJs(

  "$('#schoolYearSwitcher').change(function(e) {

    alert('Testing');

  }); "

);

?>



When the user changes the year, I want to update a session variable $session[‘schoolYears.currentSchoolYear’] to reflect this new school_year_id. I figured that would best be done via ajax.

  1. Where should I keep my ajax files? I will have an ajax file for many of my views.

  2. How do I call the ajax file from the js above? Same as regular js/ajax call? or is there a "Yii" way?

  3. How do I reload the page to reflect this change?

I appreciate any assistance.