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
Code:
<?php
echo " some information here";
// several ifs and thens here
print "
	<table width='100%' border='1' cellpadding='5'>
  <tr>
    <td height='112'><table width='100%' border='1' cellpadding='5'>
  <tr>
    <td align='center'><a href='buy.php?step=1&npcid={$npc['npcid']}' class='ajaxtrigger'>
              Buy
            </a></td>";
			print"
    <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>
  </tr>
</table>
&nbsp;
<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
Code:
$(document).ready(function(){
  $('.ajaxtrigger').click(function(){
    var url = $(this).attr('href');
    $('#buy').load(url);
    return false;
  });
});
Inside of the
Code:
<div id='buy'></div>
I have a while loop
inside of the loop I want to add a
Code:
<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
Code:
<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.