title: Jquery ajax invalid assignment left-hand side [Break On This Error] data: 'StudentClass'=StudentClass,
body: <pre><code>$("#class").change(function(){
          var StudentClass = $(this).val();
          //alert(StudentClass);
          $.ajax({
            url: "getStudentClass.php",
            type: "post",
            data: 'StudentClass'=StudentClass,
            success: function(data){
                alert(data);
            },
            error:function(){
                alert("failure");
                $("#result").html('there is error while submit');
            }   
         }); 
  
      });
  </code></pre>
  
  <p>the apove code give me this Error invalid assignment left-hand side</p>
  
  <pre><code>[Break On This Error]   
  
  data: 'StudentClass'=StudentClass,
  
  midterm_test.php (line 28, col 24)
  </code></pre>
  
  <p>any one with an idea y this is happening </p>