$(function() {



    $("#SendButton" ).click(function($e) {

        var guide = $('#guide').val();
        var description = $('#description').val();
        var status = $('#status').val();

        //var description = $("textarea#description").val();
        if (description.length > 350)
        {
            alert("Description has too many characters");
            return;
        }

        //var status = $("textarea#status").val();
        if (status.length > 350)
        {
            alert("Status has too many characters");
            return;
        }

        //invokes the getMyForms POST operation
        var xhr = new XMLHttpRequest();
        xhr.addEventListener("load", loadNewItems, false);
        xhr.open("POST", "../add", true);   //buildFormit -- a Spring MVC controller
        xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");//necessary
        xhr.send("guide=" + guide + "&description=" + description+ "&status=" + status);
    } );// END of the Send button click

    //Handler for the uploadSave call
    //This will populate the Data Table widget
    function loadNewItems(event) {

        var msg = event.target.responseText;
        alert("You have successfully added item "+msg)

    }

   } );



  function getDataValue()
  {
    var radioValue = $("input[name='optradio']:checked").val();
   return radioValue;
  }








@@ -9,18 +9,16 @@
 on() %7B%0A%0A
-%0A%0A
     $(%22#
@@ -573,351 +573,97 @@
     
-//invokes the getMyForms POST operation%0A        var xhr = new XMLHttpRequest();%0A        xhr.addEventListener(%22load%22, loadNewItems, false);%0A        xhr.open(%22
+$.ajax('/add', %7B%0A            type: '
 POST
-%22, %22../add%22, true);   //buildFormit -- a Spring MVC controller%0A        xhr.setRequestHeader(%22Content-type%22, %22application/x-www-form-urlencoded%22);//necessary%0A        xhr.send(%22
+',  // http GET method%0A            data: '
 guide=
-%22
+'
  + g
@@ -669,17 +669,17 @@
 guide + 
-%22
+'
 &descrip
@@ -683,17 +683,17 @@
 ription=
-%22
+'
  + descr
@@ -704,17 +704,17 @@
 on+ 
-%22
+'
 &status=
 %22 + 
@@ -709,17 +709,17 @@
 &status=
-%22
+'
  + statu
@@ -723,226 +723,79 @@
 atus
-);
+,
 %0A    
-%7D );// END of the Send button click%0A%0A    //Handler for the uploadSave call%0A    //This will populate the Data Table widget%0A    function loadNewItems(event) %7B%0A%0A        var msg = event.target.responseText;%0A
+        success: function (data, status, xhr) %7B%0A%0A           
      
-   
 aler
@@ -836,155 +836,219 @@
 m %22+
-msg)%0A%0A
+data)%0A        
     %7D
-%0A
+,
 %0A   
-%7D );%0A%0A%0A%0A  function getDataValue()%0A  %7B%0A    var radioValue = $(%22input%5Bname='optradio'%5D:checked%22).val(
+         error: function (jqXhr, textStatus, errorMessage) %7B%0A                $('p').append('Error' + errorMessage);%0A            %7D%0A        %7D
 );%0A
+%0A
    
-return radioValue;%0A  %7D%0A%0A%0A%0A%0A
+ %7D );// END of the Send button click%0A %7D );
 %0A%0A%0A

Update contact_me.js