Opened 13 years ago

Closed 13 years ago

#9432 closed defect (invalid)

dojo disables my form

Reported by: mlzarathustra Owned by: anonymous
Priority: high Milestone: tbd
Component: General Version: 1.3.0
Keywords: Cc:
Blocked By: Blocking:


In Firefox (but not IE) under both Windows and Linux, I have a plain old form without any javascript, that works just fine until I include dojo.js.

Once I do that, I sporadically get the following:

Error: form is null Source File: http://localhost:6080/blimp/dojo-1.3.1/dojo/dojo.js.uncompressed.js Line: 8433

The puzzling thing is that the form has no dojo code in it, and so far as I can tell there is nothing to connect it with dojo.

Here is the form:

<form name="searchForm" action="available-links.jsp">&nbsp;

Search: <input type="text" name="search" value="${}"><input type="submit" value="go"> <input type="button" value="clear" onclick="clearSearch()">


clearSearch() is defined like this:

<script type="text/javascript">

function clearSearch() {

var frm = document.searchForm; = ; frm.submit();



I'll see if I can isolate the problem further. The app is fairly complex, however, so pulling out a simple example that fails may not be practical.

Change History (2)

comment:1 Changed 13 years ago by mlzarathustra

OK, this was sort of my fault, probably. Here was what caused it:

dojo.addOnLoad(function() {

var theForm = dojo.byId("noteForm"); dojo.connect(theForm, "onsubmit", "formSubmit");


theForm wound up being null, and that was what caused the problem.

I put a null check in like this:

dojo.addOnLoad(function() {

var theForm = dojo.byId("noteForm"); if (!theForm) return; dojo.connect(theForm, "onsubmit", "formSubmit");


which fixed it.

Up to whoever gets this ticket whether you want to fix this or not!


comment:2 Changed 13 years ago by liucougar

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.