on my main page i have js function
function loadNext(last){
var index = parseInt($("#contentSupplier table tr:last td:first").html()) + 1;
$.get("suppliernext.php?index=" + index + "&" + "last=" + last, $("#supplierForm").serialize(), function(data){
$("#contentSupplier table tr:last").after(data);
});
}
and on page that is loaded suppliernext.php i have this code
<script>
$("#loadnext").attr('onclick', 'loadNext(<?=$ps?>)');
<?php
if($i >= $rowcount)
{
echo "$('#loadnext').hide();";
}
?>
</script>
this changes button on click function on the first page.
ie7 executes this code but does not change the oncick function
in ie8 chrome and mozzila it is working correctly. how can i make it work in ie7?