So someone sent me a fix for my Dating Simulator so it will work on Firefox. I tested it, and it works.
Here is the problem in a nutshell:
In IE, Opera, and Safari, if there is no return statement, it assumes the function is false and just moves on.
In Firefox, if there is no return statement, it assumes the function is true.
So with an html code like:
<a href=”#” ONCLICK=”parent.footer.choice1()” title=”try this”> IE etc, just execute the onclick command no questions asked.
Firefox executes the onclick, then (because the function is “true”) executes the anchor link # as well, which does not exist so the page gets refreshed instead, and the simulation is stumped!
I can’t remove the href, because IE will get stumped
So the fix is to change every onclick as follows:
<a href=”#” ONCLICK=”parent.footer.choice1();return false;” title=”try this”>
now it executes correctly in all browsers.
Now who is right, IE/Opera/Safari or Firefox/Mozilla?