jquery – ajax success/error functions not working fine



hello,

Acutally, I have been writing a little data admission screen which will post the form data to a page and then return a message.

however not able to get the Success or Error functions functioning correctly.

Please see the code below where strData is the posted querystring of a,b,c,d,e,f,g,17/02,2011,11,h,i,j,k

 
 
 $.ajax({
                  url: "addInterview_Code.asp",
                  type: "POST",
                  data: strData,
                  datatype: html,
                  success: function (data) {
                      $("#result").html("Success" + data);
                  },
                  error: function (jqXHR, textStatus, errorThrown) {
 
                      alert('ERROR: ');
                  }
              });
 
<div id="result">

Quite unsure here whether it should be in a form and deploying the onsubmit or press/click of a button.

Kindly guide.

Thanks to all.