troubleshooting Question

Page reload on form submission with Javascript alert stops page from rendering

Avatar of Brad Bansner
Brad Bansner asked on
Web BrowsersJavaScript
7 Comments1 Solution520 ViewsLast Modified:
In the attached HTML file... if you fill out this form, it points to itself for validation on the server side. If not all required fields are filled in, in the <head> area this is inserted:

<script language="javascript" type="text/javascript">
alert ("One or more required fields was not filled in, please answer all questions.");

The rest of the page is just HTML. In all browsers EXCEPT Firefox, this works fine and the form is redisplayed so the user can fill in the required fields. However, most of the time, in Firefox... I just get a blank white screen. The attached file is the page source when this happens. The code looks fine, but Firefox stops rendering the page for some reason. I can't get any other browser to do this, and it happens in both Windows and Mac versions of Firefox.

Any workaround for this? Thank you!

Join our community to see this answer!
Unlock 1 Answer and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros