0

How to send data via Javascript - Jquery

3
  • 1
    send data where ? what kind of data ? Commented Jan 6, 2011 at 11:47
  • 2
    from where to where, what is your current code, what is your problem, what have you already tried (I would vote that down but its not even worth wasting my points ....) Commented Jan 6, 2011 at 11:48
  • 1
    Hannes, your 1888 reputation cannot compete with Gani's 8... he/she is a member of SO for only 2 days now... we're a community to offer helping hand, not to undermine other's feelings, please consider that when posting comments Commented Jan 6, 2011 at 13:15

3 Answers 3

4

If you want to send some data to a server side script your could use AJAX. jQuery has great support through $.ajax(), $.post(), $.get(), $.getJSON():

$.ajax({
    url: '/script',
    data: { key1: 'value 1', key2: 'value 2' },
    success: function(result) {
        alert('data successfully sent');
    }
});
Sign up to request clarification or add additional context in comments.

Comments

3

$.post() or $.send() www.jquery.com

Comments

2
$.ajax({
  url: url_page, 
  data: ({id: 1, data: 1212}),
  dataType: 'json'
});

Comments

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.