How to Post large block of data to a url

Discussion in 'JavaScript' started by jtaylor, Jun 30, 2010.

  1. #1
    I have this javascript function that is being called. It is passed a url and the post data from the form.

    I want to post to the url sending it the post data. How would I do this.

    I have seen examples where you create a form with a hidden variable and then do a submit to the url. or parse the data,create hidden variables assign it the data from the post data and then do a submit.

    Is there a more straight forward and easier way than this
    <script>
    function submitFareData(url, postData)
    {
    // intercept this and add cookie data
    alert(url);
    alert(postData);

    // post line would go here

    ??? post date to url

    }
    </script>
     
    jtaylor, Jun 30, 2010 IP
  2. jam4517549

    jam4517549 Member

    Messages:
    58
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #2
    you may try AJAX and Jquery
     
    jam4517549, Jul 1, 2010 IP