0

I have text file which contains list of lonlat points. I want to send this to perlscript through ajax call . How to do it ? My code is

$.ajax({type:"POST",
        url:"softTouchurl",
        type:"Text",
        data:{file:'pointsArray.txt',action:'showPoints'},
        success:function(response){
          if(response.success) {
            alert("success");
          }
        }
      });
SSS
  • 1,380
  • 3
  • 28
  • 48
  • If you want to upload http://stackoverflow.com/questions/166221/how-can-i-upload-files-asynchronously-with-jquery – Khurshid Sep 07 '12 at 04:59

1 Answers1

1

You need your perl script to be written as a CGI script that runs on the server and lives at the URI you're sending it to ("softTouchurl" here).

There's nothing special about AJAX here - you are sending POST data to a CGI script.

barefootliam
  • 619
  • 3
  • 7
  • Yeah i am using CGI script only and also it lives at same URI .But i am not able to get file's content. Any mistake? – SSS Sep 07 '12 at 05:02