Chrome seems to reload (or perhaps restore?) the page to its original state after a function is called with onsubmit from a form. If you're whole plan is based on the altered page staying up for the user to read... that's probably not what you intend. Here's what I did:
var chrome=navigator.userAgent.search("Chrome") if (chrome != -1) { event.preventDefault(); } |
Of course, event.preventDefault(); is the workhorse there. However, Firefox started messing up on me with that in the code, so I put it one of those nifty if statements.
Addendum (several days later): I was fiddling with that same oracle earlier, and I realized that this post is probably wrong. It seems far more likely that Chrome is reacting to the document.write(); I'm calling on and not onsubmit. At any rate, it worked like a charm. :)
No comments:
Post a Comment