Closed Bug 590685 Opened 14 years ago Closed 8 months ago

The onload function does not run to completion. The variable "j" should have a value of 74.

Categories

(Firefox :: General, defect)

3.6 Branch
x86
Windows 7
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: wporter211, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 GTB7.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 GTB7.1

In following code:
<script language="JavaScript">
  var deck = new Array(75);
  var history = "";
  var j;
function genform() {
  for (var i=0; i < 75;i++) {
    document.bingo.elements[i].value = formatR(i + 1);
    document.bingo.elements[i].style.color = "#cacaca";
    document.bingo.elements[i].style.backgroundColor = "#ffffff";
    deck[i] = i + 1;
  }
  document.bingo.lastcalled.value = "";
  document.bingo.history.value = "";
  history = "";
  j = 74;
  alert("In genform: j = " + j);   //For debugging only
}
, the variable j is undefined.  I have no problem running this in IE

Reproducible: Always

Steps to Reproduce:
1. Visit the above URL and run in Firefox.
2. Visit the above URL and run in Internet Explorer.

Same website w/o alerts ends in _master.htm instead of _test.htm
Actual Results:  
Instead of getting a legal bingo number, I get "undefined undefined".

Expected Results:  
The drawn ball in the array will turn black against a yellow background instead of gray against white.  The existing drawn ball will now be the top line of the history section while other entries are shoved down a line.  The latest ball will appear next to the button "Draw Number".

N.A.
In Firefox 3.6 I get 

Error: setting a property that has only a getter
Source File: http://bellsouthpwp.net/w/b/wbport/bingo_test.htm
Line: 24

in Tools->Error Console on load, where in lines 24,12 you try to set a |history| global variable.

In Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:2.0b6pre) Gecko/20100904 Firefox/4.0b6pre everything appears to work fine. Please re-test with http://nightly.mozilla.org/ to see if the problem is indeed fixed for you in the latest development build.
Version: unspecified → 3.6 Branch
Severity: normal → S3

Closing based on comment 1.

Status: UNCONFIRMED → RESOLVED
Closed: 8 months ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.