I have a php page that contains info, and in the middle I have a 3 links going to another php page, which is then ajaxed underneath the 3 links. Too keep it simple im gonna leave out all the other nonnecessary php so as not to clutter the screen.

here is the main php file, just doing the basics
echo " some information here";
// several ifs and thens here
print "
	<table width='100%' border='1' cellpadding='5'>
    <td height='112'><table width='100%' border='1' cellpadding='5'>
    <td align='center'><a href='buy.php?step=1&npcid={$npc['npcid']}' class='ajaxtrigger'>
    <td align='center'><a href='buy.php?step=2&npcid={$npc['npcid']}' class='ajaxtrigger'>Sell</a></td>";
	print '
    <td align="center"><a href="buy.php?step=3" class="ajaxtrigger">Quests</a></td>
<table width="100%" border="1" cellpadding="5">
	echo "
	<div id='buy'></div>
echo "</table></table>
<script src='js/very-simple.js'></script>";

contents of js file
    var url = $(this).attr('href');
    return false;
Inside of the
<div id='buy'></div>
I have a while loop
inside of the loop I want to add a
<div id='qty'></div>
that reflects a change in the database when the person hits the sell submit button at the end of each while loop line.

Example lets say
Car Quantity sell price sell
mustang 5 500 (dropdown quantity select) sell submit button

lets say you select 2 and click sell, which goes to another page and updates the database to 3 and I want to use ajax the
<div id='qty'></div>
to reflect the new quantity, just in this line. I have tried to use it but all it does and remove the current Div ID which includes the while loop and puts, at the moment, just a echo'd statement, so I would know if it is working or not.

Is there a way for me to fix this?

Thank you in advance.