title: ajax InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable
body: <p>Very strange issue...I am trying to pass multiple values to a method in post. It works fine as long as I dont post as an object. But when I try to post as an object I get the error</p>
  
  <blockquote>
    <p>Uncaught InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable. </p>
  </blockquote>
  
  <p>here is the code</p>
  
  <p>This works</p>
  
  <pre><code>var x = $('#myDiv').val(canvas.toDataURL("image/png", 1.0);    
                  $.ajax({
                      type:'POST',
                      url:"/myMethod/test",
                      data: x,
                      success:function (response) {
                  }
              });
  </code></pre>
  
  <p>But this would NOT work</p>
  
  <pre><code>var x = $('#myDiv').val(canvas.toDataURL("image/png", 1.0);    
                      $.ajax({
                          type:'POST',
                          url:"/myMethod/test",
                          data: {x:x}, 
                          success:function (response) {
                          }
                      });
  </code></pre>
  
  <p>I am not sure why it is complaining when I try to send it as an object</p>