The jQuery command $.post is used to "post" PHP 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.
Questions tagged [jquery-post]
196 questions
2
votes
2 answers
How to access the returned object of JQuery "POST" method in javascript?
I have a JQuery "POST" method which returns value
Objects: [{"in_approved":0, "out_approved":0},{"in_approved":1, "out_approved":2}]
Ajax method:
$.ajax({
data: {
"start_date" : startDate,
"end_date" :…

Newbie
- 249
- 1
- 9
- 19
2
votes
2 answers
Jquery Tagit - How to pass the typed tags back to PHP
I'm using the following tagit plugin
http://webspirited.com/tagit/
This is the code snippets of the html page that I am trying to test this plugin with - where the user types the tags

Gublooo
- 2,550
- 8
- 54
- 91
2
votes
2 answers
should-be-working jQuery .post() function to HTML via PHP?
I went through the code at the following two links:
http://pastebin.com/iUd22CRY
http://www.jensbits.com/2009/10/04/jquery-ajax-and-jquery-post-form-submit-examples-with-php
Everything seems pretty clear in the code itself, but I can't figure out…

Wolfpack'08
- 3,982
- 11
- 46
- 78
2
votes
1 answer
Jquery Post & ASP.NET MVC Anti-ForgeryToken Validation
In my controller,
[HttpPost]
[OutputCache(CacheProfile = "Short", VaryByParam = "id", VaryByCustom = "none")]
[ValidateAntiForgeryToken(Salt = @ApplicationEnvironment.SALT)]
public ActionResult username(string id) {
…

user1542653
- 439
- 2
- 6
- 16
2
votes
0 answers
jQuery / IIS7 / Classic ASP - "HTTP Error 405.0 - Method Not Allowed"
I'm on Windows 7 Home Premium (IIS7) using Classic ASP (please don't ask). Using jQuery to POST some data
$.ajax({
url: "widgets/post.html",
type: "POST",
data:nhs,
dataType: "json",
success: function(data) {
$('#result').html(…

pee2pee
- 3,619
- 7
- 52
- 133
2
votes
2 answers
Combine JQuery Click() and C# Button OnClick() events
Guys I've a situation here,
I've a HTTP handler (InsertMap.ashx) to save the Data to Database (TABLE 1), and I'm calling that method using JQuery as follows
$('a#AnchSaveData').click(function (e) {
e.preventDefault();
…

Unknown Coder
- 1,510
- 2
- 28
- 56
1
vote
2 answers
Returning jQuery Ajax Post
I wish to use the jQuery.post class to return (not alert) the response within a function.
The following gives an alert with the appropriate value:
function test_func() {
$.post("test.php", { cmd: "testing" }, function (data) { alert(data);…

Gaias
- 45
- 5
1
vote
1 answer
Joining two query_posts codes
How do I join these two codes so that they work?
16,
'paged' => ( get_query_var('paged') ? get_query_var('paged') : 1 ), ));
?>
and
cat_name .…

rlab
- 449
- 1
- 7
- 24
1
vote
1 answer
Cakephp empty $this->data after $.post submit through jquery
I want to pass data to my ajax function in the controller, however the $this->data is empty.
I have in the JS:
$.post('/teach/update_word', {one: '1', two: '2'}, function (data){
alert(data);
});
And in the Controller:
function update_word(){…

mgPePe
- 5,677
- 12
- 52
- 85
1
vote
1 answer
Passing in parameters to jQuery .click
I have a list, populated from rows in a MySQL database and I want to flag those rows in the database when the link is clicked, using jQuery .click and .ajax by triggers a PHP script and passing in the the database primary key ID.
I have this jQuery…

Ste
- 591
- 1
- 9
- 20
1
vote
1 answer
Send data from jQuery to PHP for mailing
I’ve a javascript file I’ve been using as an template for a site I’m working on and in that script there is a simple form validation where it – if no error occur – sends data to an PHP page called contact.php.
But I’m unsure on how I “grab” the data…

Emil Devantie Brockdorff
- 4,724
- 12
- 59
- 76
1
vote
1 answer
Unexpected end of input JSON.parse (PHP, JSON, jQuery.post, database)
I have a php-file which creates a json and passes it on to javascript

DNA
- 127
- 1
- 12
1
vote
1 answer
$(document).ready(function() is not working after page refresh in ie6
$(document).ready(function() not working after page refresh in ie 6.Is there any problem to use?Whether it will work in all condition when page load happens...In other browser also?
Thank You

Joby
- 379
- 1
- 3
- 10
1
vote
1 answer
$.ajax post is not working on server but working fine in localhost
I have a scenario of a single 'Save' button upload either text or image at a time. So, when I am trying to save text, it is working fine, posted & giving response but when I am trying to save image then it is posted fine but not receiving response.…

Ishan Malik
- 35
- 6
1
vote
1 answer
Unable to pass date value to controller method via jquery post method.
I have a json object like this :
var data = {};
data =
{ "First" : _this.getFirstElement.val(),
"Second": _this.getSecondElement.val(),
"DateProperty" : _this.getDatePropertyElement.val()
};
This is passed to the controller method…

SunilA
- 513
- 8
- 19