Questions tagged [.post]

A jQuery wrapper for an AJAX call using the HTTP POST method to send variables asynchronously from the current page without reloading or leaving the current page. Data can then be retrieved from the request and used on the current page.

Docs

273 questions
5
votes
2 answers

PHP and jquery: waiting for $.post

I have a jquery function, doing a $.post of a value to a php function. This php function then puts this value in the $_SESSION and shows the appropriate content. I would like that the execution does not continue until the post is completed, since…
luqita
  • 4,008
  • 13
  • 60
  • 93
5
votes
4 answers

jquery $.post - json - proper way to send/receive input data (on the client side only) - A Two Questions Quest

Let's imagine that we have something like: $.post('somescript.php', 'WHAT CAN WE PUT HERE?', function(replyData) { 1) By default, the third argument of $.POST method, will read the XMLResponse response correct? So, why do we need that…
MEM
  • 30,529
  • 42
  • 121
  • 191
4
votes
1 answer

Looking for syntax guidance on implementing AJAX project

I am taking on my first AJAX project and conceptually have everything mapped out for the most part but am being held back due to my lack of knowledge syntactically. I think I also might be off the mark slightly with my structure/function logic. I…
LightningWrist
  • 937
  • 4
  • 20
  • 37
3
votes
2 answers

JQuery $.post Variable Post Name

I'm having an issue with the jquery post() function. I have several buttons and am using a single post function to handle all the buttons. I can't seem to get the variable post name to work. my code is as follows: JS NOTE: the "editor" variable is…
Laurence
  • 409
  • 3
  • 7
  • 17
3
votes
4 answers

issue with jquery .post() not working

so I am new to using jquery .post() however I am not using methods i haven't already used before. I am trying to post two hidden input values when a button is clicked: $('#button').live('click', function() { $.post('export_file.php', { group:…
dapperwaterbuffalo
  • 2,672
  • 5
  • 35
  • 48
3
votes
2 answers

using jquery $.post() for returning multiple values

I am trying to use a $.post() in the following way: $.post("file.php", { file_id: $(this).val()}, function(data){...} The file.php then does a database query and returns an array with a title, description and image reference. What I want to do then…
TH1981
  • 3,105
  • 7
  • 42
  • 78
3
votes
1 answer

Passing an array back to the server using JQuery .post()

There are loads of questions and answers regarding the issue of posting arrays back to the server using jquery. However I cant seem to find any solutiion to the problem I'm having. Basically the code below should return an array of ID's back to the…
FloatLeft
  • 1,317
  • 3
  • 23
  • 40
3
votes
2 answers

blur event doesn't trigger at first attempt

I'm trying to update the DOM based on the value entered in a text box. HTML: JQUERY: $('#event-name').on('blur',function(){ $.post("scripts/add-team-support.php",{eventName :…
Altair827
  • 329
  • 1
  • 2
  • 10
3
votes
1 answer

.ajax() call always execute .fail() even after success in server side code (Web-api)

I have an ajax call to a web-api page (/api/attendances). Its inserting a record , and return OK() as a result. Issue: insert is done correctly ,and OK will be returned, but instead of .done()/success() function, it calls .Fail()/error() . I…
Sara N
  • 1,079
  • 5
  • 17
  • 45
3
votes
2 answers

How to execute multiple, chained $.post() calls in consecutive order?

What I'm Trying To Accomplish I need to trigger 1 to 3 different $.post() requests, and whether it's 1 call, 2 consecutive calls, or 3 consecutive calls is decided by some basic user selection. Each call must only start after the previous is…
Andre Bulatov
  • 1,090
  • 3
  • 16
  • 47
3
votes
2 answers

Can't make DataTables work by using jQuery .post()

I am working on a form where a uses chooses a date range in order to display information by using DataTables. When the user clicks on the button, the dates are sent through jQuery .post() function and it retrieves the info as expected. Here is the…
Pathros
  • 10,042
  • 20
  • 90
  • 156
3
votes
3 answers

Make jQuery Wait For $.post to complete updating page

I am calling a function to refresh a part of the current page with a jQuery.post - and then after that function completes I need to execute another function that updates the Google Map on that page, using the updated HTML written out from the…
Chris DeMarco
  • 173
  • 1
  • 9
3
votes
2 answers

jQuery document.ready with ajax $.post

So I have a function that uses jQuery's $.post mechanism to fill in a div with contents from another page. I want to fire this method in the very beginning to show the content in the div right away. To do this I call the method in the document.ready…
Steve-o-graph
  • 67
  • 1
  • 6
3
votes
2 answers

$.post() not working in Internet Explorer

My form sends perfectly well in Chrome and Firefox, with no errors displayed in firebug. However, in IE the form fails to send. I have narrowed it down to the $.post() function, which just doesnt seem to be called in IE. The callback function works,…
lukeocom
  • 3,243
  • 3
  • 18
  • 30
3
votes
2 answers

Using $.post to send JS variables to PHP script

I am trying to send Javascript variables over to a PHP script for updating scores of a quiz game. I've looked up the shorthand method of doing this, which is $.post, but I am unable to retrieve the values in the PHP script. I am fairly unfamiliar…
user2177629
  • 167
  • 3
  • 3
  • 8
1
2 3
18 19