Windows Safari form 'submit' and javascript onclick event problem
Windows Safari problem:
If I execute the line below, updatePriority() below runs, actiontemp.php gets called and my tables update appropriately.
<input type="button" value="P" title="Prioritise" onclick="updatePriority('<?php echo $my->id; ?>','<?php echo $ubooks[$i]->book_id; ?>');" />
function updatePriority(UserID,BookID)
{
$(document).ready(
function()
{
$.post("actiontemp.php", {ui: UserID, bi: BookID, actionType: 'update'});
});
}
If I change the 'button' to type 'submit', actiontemp.php above no longer gets called.
<form action="pagerebuild.php" method="post" name="something">
<input type="submit" value="P" title="Prioritise" onclick="updatePriority('<?php echo $my->id; ?>','<?php echo $ubooks[$i]->book_id; ?>');" />
</form>
Other browsers seem to work OK. Has anyone else encountered this?