You messed up.
Code:
<form name="this_form" method="POST" action="">
<input type="submit" name="submit4" value="Submit" onclick="loadNextPage(1)"></button>
</form>
First of all, that is ILLEGAL HTML. So who knows what the various browsers will do with illegal html?
You have a </button> tag but *NO* matching <button> tag.
But more than that...
Because that button is a SUBMIT BUTTON, when the
loadNextPage function returns, the button GOES AHEAD AND SUBMITS THE <FORM>!!!!
FireFox is doing the *right* thing. I have no idea why Chrome doesn't act the same way.
**********
Two simple answers:
(1) Make sure you return
false from the onclick:
Code:
<form name="this_form" method="get" action=""><!-- or omit the method -->
<input type="submit" name="submit4" value="Submit" onclick="loadNextPage(1);return false">
</form>
Simpler answer: Don't use a submit button:
Code:
<form name="this_form" method="get" action=""><!-- or omit the method -->
<input type="button" value="Submit" onclick="loadNextPage(1);">
</form>