there is something wrong with this Jquery post?

Josh

New Member
im trying to pass on the id attribute to the file.php, but its giving me 0 every time, when i try to insert it into the database, the javascript and the html is provided!\[code\]$(function() { $(".follow").click(function(){ var element = $(this); var I = element.attr("id"); var info = 'id=' + I; $.ajax({ type: "POST", url: "file.php", data: info, success: function(){} }); $("#follow"+I).hide(); $("#remove"+I).show(); return false; });});\[/code\]html file:\[code\]<div id="follow1"><a href="http://stackoverflow.com/questions/3681070/#" class="follow" id="1"><span class="follow_b"> Follow </span></a></div>\[/code\]p.s. it deos insert the value in the databasefile.php:\[code\]<?php$id =$_POST['id'];msql_insert.........?>\[/code\]
 
Back
Top