0

I have below code , here i need to get Value1 from .done and assign it outSideValue. How i can get it ?

function callGetTxt(){

 var outSideValue;
  $.ajax({
      url: 'data',
      cache: false
  })
  .done(function( text ) {

       arr1 = text.split('\n');

       var Value1 = arr1[0];


    });



}
sree
  • 121
  • 1
  • 18

1 Answers1

0

how about this one?

formData = {
    outSideValue: outSideValue
}
$.ajax({
    url: "data",
    cache: false,
    data: formData,
    success: function(data) {
        //success handling
    },
    error: function(data) {
        //error handling
    }
});
Nurdin
  • 23,382
  • 43
  • 130
  • 308