Closed
Bug 283818
Opened 20 years ago
Closed 20 years ago
Global array declerations are not handled properly
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 114461
People
(Reporter: marcus.pries, Unassigned)
Details
Attachments
(1 file)
|
677 bytes,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Example:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
<title>pries-edv</title>
<script type="text/javascript">
<!--
var t = new Array();
function test() {
t[0]='Hello';
t[1]='my';
t[2]='World';
t[3]='!!!';
document.write(t[0] + ' ' + t[1] + ' ' + t[2] + ' ' + t[3] + '<br>');
for (var i=0;i<=3;i++) {
document.write(i + ' : ');
document.write(t[i] + '<br>');
}
}
-->
</script>
</head>
<body>
<form>
<input type="button" name="testButt" value="global test"
onClick="test()">
</form>
</body>
</html>
Reproducible: Always
Steps to Reproduce:
1. load the html file in Firefox
2.
3.
Actual Results:
The array t is not visible in the for loop. JavaScript thorows an error "t is
not defined' after writing
Hello my World !!!
0 :
to the document.
Expected Results:
Expected output is:
Hello my World !!!
0 : Hello
1 : my
2 : World
3 : !!!| Reporter | ||
Comment 1•20 years ago
|
||
| Reporter | ||
Updated•20 years ago
|
Summary: Global variable declerations are not handled properly → Global array declerations are not handled properly
| Reporter | ||
Updated•20 years ago
|
OS: Windows XP → Windows 2000
Updated•20 years ago
|
Assignee: general → general
Component: JavaScript Engine → DOM: Level 0
QA Contact: pschwartau → ian
Comment 2•20 years ago
|
||
*** This bug has been marked as a duplicate of 114461 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•