Simple page to exhibit possible Mozilla bug


Bruno T. C. de Oliveira, 2003.09.08

This is a simple HTML page designed to exhibit an undesired Mozilla behavior I have observed in many web pages. Rather than submitting the URL's of each of the 17 or so web pages where I found this behavior, I have examined their source code and boiled the problem down to one aspect of Mozilla's JavaScript handling.

Below is a regular HTML form, whose opening tag is:

<form name="theForm" method="get" action="nextpage.html" id="theForm">

Notice that it has no "Submit" button. Instead, I placed a hyperlink with some JavaScript code. The link is set up like this:

<a href="javascript:theForm.submit()">
therefore it should work exactly like a submit button. However, both in the Unix and Win32 builds, the link does not work. An error appears in the JavaScript console to the effect that theForm is undefined.

In Microsoft Internet Explorer it works fine: the form submits without problems.


Here is the form for your enjoyment: try clicking the link. You don't need to fill in anything in the text box.

Type anything (if you want):
Submit form