Loading...
Copy code
Close
Permalink
Close
Please tell us why you want to mark the subject as inappropriate.
(Maximum 200 characters)
Report Inappropriate
Cancel
Private Message
From :
guest
To :
Subject :
Content :
Type the characters you see in the picture below.
Send
Cancel
From :
guest
To :
Subject :
Content :
Type the characters you see in the picture below.
Send
Update
Cancel
Feedback
Email ID
Subject :
Comments :
Send
Cancel
Private Message
Type the characters you see in the picture below.
Type the characters you see in the picture below.
Attach files
Desktop
Google Docs
Each Attachment size should not exceed 1.0 MB.
Max no of attachments : 3
Loading User Profile...
guest
Response title
This is preview!
Attachments
Publish
Back to edit
Cancel
(
)
Sign In
New to this Portal? Click here to
Sign up
You can also use the below options to login
Login with Facebook
Login with Google
Login with Yahoo
jQuery
Plugins
UI
Meetups
Forum
Blog
About
Donate
All Forums
Recent Posts
Log In
Search
jQuery
Search
jQuery Forum
Screen name:
unclejc
unclejc's Profile
1
Posts
1
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Ideas
Problems
Expanded view
List view
Private Message
Post data not showing at the process script.
[2Replies]
20-Mar-2011 03:32 PM
Forum:
Getting Started
I've been having great difficulty with this simple script. From every thing I've read this should work.
$(document).ready(function(){
$(".add_to_profile").css("background-color", "yellow");
$('a.bookmark').click(function (){
var addedbookmark = function (data) {
var divreturn = 'div.return-'+ data.nid;
var divbookmark = 'div.bookmark-'+ data.nid;
$(divreturn).html("bookmark added");
$(divbookmark).html('<a href="remove_bookmark/'+ nid+'" class="bookmark">Remove Bookmark</a>')
$(divreturn).html(nid );
}
$.ajax(this.href,
{
type : 'POST',
dataType : 'json',
success : addedbookmark,
data : "js=1",
});
// return false;
});
});
The important data is sent as a get, and works fine, but I need the post to signal that jQuery sent the data.
<?php
var_dump($_POST);
die;
header('Content-type: application/json');
echo json_encode (array(
'success' => 'added to profile',
'nid' => 95,
));
exit();
All I get is:
array
empty
It would be great if someone could give me a clue.
«Prev
Next »
Moderate user : unclejc
Forum