I'm creating a website for my uni final year project and I am having real problems with the one seemingly small thing.

I'm using php to create a forum table with a dynamic link with the following code;

```
<td bgcolor="#FFFFFF"><? echo $rows['id']; ?></td>
<td bgcolor="#FFFFFF"><a id="viewTopic.php?id=<? echo $rows['id']; ?>" href="viewTopic.php?id=<? echo $rows['id']; ?>"><? echo $rows['topic']; ?></a><BR></td>

```

I want to use jquery to open the link from the table above in a div ajax style. I have done this successfully with other links using this code;

```
$("#forum").click(function(){

        $("#subConList").html(loadAni).load('mainForum.php');       
    });

```

I Don't have a clue how to do this because of the php used in the href of the table link. Spent hours trying to sort this out. Any help suggestions would be great appreciated.

Thanks

I changed the tag to a button, shown below

```
<button id="topic<? echo $rows['id']; ?>" href="viewTopic.php?id=<? echo $rows['id']; ?>"><? echo $rows['topic']; ?></button>

```

This is the jquery i'm using to to try and load content to the #subConList Div.

```
$(document).ready(function(){
$("#topic<?php echo $rows['id']; ?>").click(function(){

        $("#subConList").html(loadAni).load('viewTopic.php?id=<?php echo $rows['id']; ?>');     
    });
});

```