Board index   FAQ   Search  
Register  Login
Board index php forum :: HTML JavaScript

like button isn't working

Javascript coding ..

Moderators: macek, egami, gesf

like button isn't working

Postby suchait24 » Sat Feb 09, 2013 8:57 am

Hi frds

I created a like button



What i need : when user click on this button,it must be disabled

my problem: code isn't working....

<script type="text/javascript">


$(function() {

$('.like').live("click",function()
{
var ID = $(this).attr("id");
var dataString = 'msg_id='+ ID; //passing id of msg



$.ajax({
type: "POST",
url: "count_like.php", //php script which contains the backend working .
data: dataString,
cache: false,
success: afterSuccess //call function after success


});




return false;
});




});

function afterSuccess() { //this part of function isn't working

$("#like").attr("disabled","disabled");
$("#like").css("background-color","silver");


$("#like").click(function(e){
if($("#like").attr("disabled")=="disabled")
{
e.preventDefault();
}
});


}



</script>



In this code ajax calling is working fully fine as i need but disabling function isn't working...

help please
Thnx in advance
suchait24
New php-forum User
New php-forum User
 
Posts: 3
Joined: Thu Jan 24, 2013 4:50 am

Re: like button isn't working

Postby seandisanti » Wed Mar 06, 2013 3:22 pm

in the working section, your selector is grabbing elements with the 'like' class, in the other section your selector is for the 'like' id. Without seeing your html for the button, I would assume that the one not working is using the wrong selector.
seandisanti
php-forum Fan User
php-forum Fan User
 
Posts: 679
Joined: Mon Oct 01, 2012 12:32 pm

cheapest Herve Leger on sale (7)

Postby griffis99 » Sun May 12, 2013 3:39 am

How does it feel to have a petition page right within your own website and lambasting your own policy?
MoveOn.org wants to give the social herve leger dresses cheap networking giant a dose of its own medicine. The advocacy group has created a Facebook group petition page, Facebook, respect my privacy! urging the social networking giant not to share user information with third-party advertisers.
The group, which already has 47,978 members as of this writing, is MoveOn.org?s answer to the instant personalization feature recently launched by Facebook CEO Mark Zuckerberg. The feature is still in beta, with Yelp, Pandora and Docs employing instant personalization.
Instant personalization blurs the distinction between Facebook and other websites, allowing a user?s activities on the latter to show up in Facebook. When a person is logged in to Facebook, for instance, and visits Pandora, the latter pulls up his profile information to personalize the experience.
If the user has listed on his Facebook profile that he liked a particular song, for instance, he is likely to hear that song when he herve leger sale article logs in to Pandora. Anything the user does on a third-party partner website (commenting or liking a particular content) will be visible on his Facebook wall and published in the newsfeed.
?When you buy a book or movie online?or make a political contribution?do you want that information automatically shared with the world on Facebook? Most people would call that a huge invasion of privacy. But herve leger swimsuits recently, Facebook began doing just that. People across the country saw private purchases they made on other sites displayed on their Facebook News Feeds,? MoveOn.org wrote on its website.
Electronic Frontier Foundation, is also protesting Facebook?s latest feature. The digital rights advocate has published a timeline chronicling Facebook?s ?eroding privacy policy.? EFF also has a Facebook page dedicated to this cause.
Facebook is a sucker for change but its most recent initiatives have stirred a hornets? nest. Aside from the two advocacy groups, four Democratic senators are also protesting the move. One of them, Sen. Charles Schumer (D-N.Y.), has asked the Federal Trade Commission to investigate if Facebook?s privacy policy is misleading to users.
Schumer, along with three fellow Democratic senators Michael Bennet (D-Col.), Al Franken (D-Minn.) and Mark Begich (Alaska), wrote to Facebook founder and CEO Mark Zuckerberg asking for clarification about the privacy implications of the Open Graph protocol. The lawmakers are also asking the social networking giant to change the way user information is shared with third-party advertisers.
In the letter, the senators raised three concerns that Facebook users have about the latest changes to Facebook?s privacy policy.
1. Facebook has public-by-default privacy settings for user information such as current city, hometown, education, work, interests, and connections. The senators said it should be the other way around; the information should neiman marcus herve leger be hidden from public view unless users want to share them with the community. This way, members are given greater control over their personal data.
2. Previously, Facebook allowed third-party websites to store user information for only 24 hours. The senators are concerned that the current setup allows indefinite storage period for users? profile data. Facebook should reverse this policy and leave it up to the members to allow external websites to have access to their data for more than 24 hours.
3. Facebook?s latest feature, instant personalization, allows integration of Facebook?s functionality with those of other popular websites. By accessing external websites while logged in to Facebook, however, the senators are worried that a user may also unwittingly divulge the personal data of his contacts. Again, they want Facebook?s default opt-in setting for this feature reversed. Many Facebook users are unaware that they can opt-out, and even if they do know, the process is somewhat confusing for them, the senators said.
Users who want to opt-out of the feature may check out this step-by-step guide on How to Opt Out of Facebook?s Instant Personalization.
Facebook?s Elliot Schrage, vice president of communications and public policy, wrote back to Schumer defending the social network?s herve leger swimwear cheap latest initiatives. Schrage said that they were meant to enhance user personalization of their activity on various websites while allowing members to control the data that they herve leger gold bandage dress share.

Related articles:


cheapest Herve Leger on sale (33)
griffis99
New php-forum User
New php-forum User
 
Posts: 40
Joined: Mon Dec 17, 2012 12:41 am


Return to JavaScript

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron