Jump to content

darrentaytay

New Members
  • Posts

    1
  • Joined

  • Last visited

darrentaytay's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. If you need to retrieve the ID, since your using jQuery you can set and get it using .data(). So if you had a list of members like this: <a class="member" data-memberid="1" href="www.ex.com/action.php?me=1">member1</a> <a class="member" data-memberid="2" href="www.ex.com/action.php?me=1">member2</a> <a class="member" data-memberid="3" href="www.ex.com/action.php?me=1">member3</a> You could retrieve the ID for each member and make your AJAX request like this: <script> $("a.member").click(function(e){ var memberID = $(this).data('memberid'); $.ajax({ type: "GET", url: "action.php?me=", data: { me: memberID }, success: function(data){ alert(data); } }); e.preventDefault(); }); </script> Hope that helps.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.