Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3991388
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T06:36:35+00:00 2026-05-20T06:36:35+00:00

I need to send data to a remote server using javascript. How do I

  • 0

I need to send data to a remote server using javascript. How do I do this?

Background info:
There’s a webpage from which I extract some information using JS, and I need to send it back to another server for processing. Response is not neccesary. The data is XML, Which I’ve URLencode’d.

How would one do this?

EDIT

The server I’m requesting the data from is not the same that receives the data. Just to clarify.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T06:36:36+00:00Added an answer on May 20, 2026 at 6:36 am

    One of the most common ways to do this is AJAX. Here’s how you perform an AJAX post request using jQuery:

    <script type="text/javascript">
      $.post('/remote-url', {xml: yourXMLString });
    </script>
    

    On the server side you process it like any other POST request. If you’re using PHP it’s $xml = $_POST['xml'];

    The biggest limitation of AJAX is that you’re only allowed to make requests to the same domain the document has been loaded from (aka cross-domain policy). There are various ways to overcome this limitation, one of the easiest one is JSONP.


    UPD. For cross-domain requests an extremely simple (though not universal) solution would be:

    (new Image).src = 'http://example.com/save-xml?xml=' + escape(yourXMLString)
    

    This will issue a GET request (which cannot exceed 2KB in Internet Explorer). If you absolutely need a POST request or support for larger request bodies you can either use an intermediate server-side script on your domain or you can post a dynamically created html form to iframe.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to read from NetworkStream which would send data randomly and the size
I have a requirement where I need to send some data from my server
I need to upload an image to a remote PHP server which expects the
I need to POST some XML data to a remote server for processing. The
I have a problem while I need to send data using uploadify script. For
I need to send some data periodically from an Android app to an external
I need a queue to send data from ruby to python The system is
I need to send and receive data over serial connections (RS-232 and RS-422). How
I need to send a very specific (non-standard) string to an FTP server: dir
We need to send email which contains Pound (currency) symbols in ColdFusion. Before sending

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.