0
  <a class="source" href="jquery-lead.php?source=<?=$src;?>">3</a>

<script type="text/javascript">
    $("a.source").live('click', function() { 
        $("#results").load(this.href, { page: $(this).text() });
      return false;
    });
    $("a.source:first").click()
</script> 

I am able to pass $src variable to my php script, but I also want to pass whatever is in the tag. In this case "3", this is going to be a pagination..

vick
  • 939
  • 1
  • 8
  • 14
  • 7
    People will be more inclined to help if you go back and accept answers to your previous questions. – Oren Hizkiya Apr 27 '10 at 22:48
  • 2
    @vick - @Oren's correct - There are many benefits: you get rep, the answerer gets rep, your questions are much more appealing to answer, meaning you get quicker answers) and the next person finding this gets to the correct answer quicker. – Nick Craver Apr 27 '10 at 22:57
  • 1
    No Vick. Not "next time". You SHOULD accept answers NOW. Go to your user-page: http://stackoverflow.com/users/305360/vick, go through your 14 previous questions, and mark at least some answers as "Accepted". – abelenky Apr 27 '10 at 23:20
  • I had no idea I had to accept questions, I will do it now. – vick Apr 28 '10 at 00:48

2 Answers2

2

Updated for comments - You can do it like this:

$(function() {
  $("a.source").live('click', function() { 
    $("#results").load(this.href, { page: $(this).text() });
    return false;
  });
  $("a.source:first").click();
});

This uses .load(url, data), in your php the page variable will now be available...or whatever you want it called, just rename appropriately.

Nick Craver
  • 623,446
  • 136
  • 1,297
  • 1,155
0
$(this).text();
alex
  • 479,566
  • 201
  • 878
  • 984
racerror
  • 1,599
  • 8
  • 9