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>
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
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>
It's SUPPOSED to submit the form after the last one. Also doing that completely breaks the 10 seconds disabled thing.
Last edited by markman641; 10-30-2012 at 11:07 PM..
If you submit the <form>, it *WILL* rebuild the ENTIRE page, and so any change to the <iframe> *WILL* be lost. You have no choice on that.
What I mean by "after the last one" is that it shows the x amount of websites in the iframe, and then when the user gets to the last one and clicks continue it ACTUALLY submits for form. It's supposed to do this so that I can move the user on to the next part of the registration process. This is exactly what chrome does.
Last edited by markman641; 10-31-2012 at 01:25 AM..
That is, you are invoking a jQuery function to do the animate, right?
BUT YOU DO NOT HAVE THE jQUERY LIBRARY LOADED on that page!!!!!!!!!
So the animate line gets an *ERROR* and the function exits on the error.
And when it exits on error there is only 1 chance in 4 billion that it will return false.
So it is returning true, because of the error, and thus allowing the submit to proceed.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.