2

Every time user click specific button, my javascript code needs to send request to the different server, and download a file to my server, than process it.

Is it possible to do?

1
  • 2
    The JavaScript should tell your server via an AJAX call to contact the other server and download a file. Server-side code handles the file transaction between the 2 servers, not JS. Commented Dec 4, 2012 at 1:55

1 Answer 1

1

JavaScript by itself would not be able to do this, as it is a Client-side scripting language, meaning it runs entirely on the user's browser and has little to do with the server itself.

However, it would be entirely possible to do this with PHP (or any other server-side language), and then have JavaScript tell the server to run the PHP script to download and process the file.

Sign up to request clarification or add additional context in comments.

1 Comment

I got you, thank you very much, I was thinking the same, but was hoping that I'm wrong ))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.