title: Jquery event identical with Load event in .NET
body: <p>I am more familiar with .Net than languages used in web development but I'm working with a web application.</p>
  
  <p>I have a drop down list that when the user selects other option, checkboxes should appear depending on the option selected. My problem is that, the drop down list has a default option when it is loaded; so there should already be checkboxes. If it is .Net, I will just put my codes for the checkboxes in the Load() event, but how about in Ajax/jquery because I used on("change")? Can anyone help me what is similar to Load event in Ajax/jquery? </p>
  
  <p>Here's my code:</p>
  
  <pre><code>$('.select-movie-status').on("change",function(){
          var adStatus = parseInt(this.value);
          $.ajax({
              url: 'db.php',
              type: 'GET',
              dataType: 'JSON',
              data: {action: 'getMoviesByStatus', id: adStatus},
              success: function(data){
                  //alert(adStatus);
                  console.log(data);
                  var forChk='';  // putting the titles in a checkbox
                  for(var i=0; i&lt;data.length;i++){
                      if(i==0){
                          forChk= '&lt;div class="movieLists"&gt;&lt;label class="checkbox-inline"&gt;&lt;input type="checkbox" value="data[i].movieID" name="movie_array[i]"&gt; ' + data[i].title + '&lt;/label&gt;&lt;/div&gt;';
                      }
                      else{
                          forChk+= '&lt;div class="movieLists"&gt;&lt;label class="checkbox-inline"&gt;&lt;input type="checkbox" value="data[i].movieID" name="movie_array[i]"&gt; ' + data[i].title + '&lt;/label&gt;&lt;/div&gt;';
                      }
                  }
                  $('#movieTitles').html(forChk);
              }
          });
      });
  </code></pre>
  
  <p>And the code for the drop-down list:</p>
  
  <pre><code>&lt;select class="half-form select-movie-status" name="section"&gt;
                  &lt;option class="adStatus" value="1"&gt;Now Showing&lt;/option&gt;
                  &lt;option class="adStatus" value="2"&gt;Coming Soon&lt;/option&gt;
              &lt;/select&gt;
  </code></pre>