Grab id from url

Grab id from url

I was seeing if someone could help me...
 
I would like to grab an id from an <a> anchor tag and post the data to another file and populate a div area with the data requested.
 
Initially I have a while loop in php that prints line items...
 
I have an anchor that will print for each item.  When the user clicks on the link, I have it opening a modal popup window to show the data grabbed from the other file.
 
How do I grab data from the anchor tag??
 
I tried using the value attribute in the <a> tag and it doesn't seem to work...
could anyone provide me insight?
 
here is my jquery...
[code]
//select all the a tags with name equal to review
  
  $('a[name=modal]').click(function(e)
  
   {
    e.preventDefault();
    
    //get the a tag
    var id=$(this).attr('href');
    var swID=$(this).attr('value');
    
    //post to a data page
    
    $.post(
   
   //'swClinicEvalPull.php',
   
  {
    swID:swID
    
   },
   
   function(response)
   {
    $("#reviews").load("swClinicEvalPull.php");
    $("#swDateCompleted").val("");
    $("#descriptionMemo").val("");
    $("#pedigreeUpdated").val("");
    $("#assessmentMemo").val("");
    $("#followupAsNeeded").val("");
    $("#followUpMemo").val("");
    
    
    
   }
   
   );



































 
  });
[/code]
 
then here's my html
 
<a href="#review1" name="modal" value="<?php echo $swClinicID; ?>">Comp Clinic Eval form</a>
 
thanks,
shoegirl31