F
Fred
Group,
I coded this sample htm to show that javascript can drop index values
without any error messages. Does anyone know why this would happen?
Thanks
Fred
sample htm to follow -->
<html>
<BODY>
<br>
<SCRIPT LANGUAGE="Javascript">
document.write ("Sample to show index as 2 digit number");
Monthname = new Array()
Monthname[01] = 'January';
Monthname[02] = 'February';
Monthname[03] = 'March';
Monthname[04] = 'April';
Monthname[05] = 'May';
Monthname[06] = 'June';
Monthname[07] = 'July';
Monthname[08] = 'August';
Monthname[09] = 'September';
Monthname[10] = 'October';
Monthname[11] = 'November';
Monthname[12] = 'December';
document.write ('<br>before for loop lgth=' + Monthname.length)
for (var r=1; r < Monthname.length; r++) {
document.write("<br>" + r + ") " + Monthname[r])
}
document.write ("<br><br>Sample to show index as 4 digit number - missing
Aug and Sept values");
Monthname4 = new Array()
Monthname4[0001] = 'January';
Monthname4[0002] = 'February';
Monthname4[0003] = 'March';
Monthname4[0004] = 'April';
Monthname4[0005] = 'May';
Monthname4[0006] = 'June';
Monthname4[0007] = 'July';
Monthname4[0008] = 'August';
Monthname4[0009] = 'September';
Monthname4[0010] = 'October';
Monthname4[0011] = 'November';
Monthname4[0012] = 'December';
document.write ('<br>before for loop lgth=' + Monthname4.length)
for (var r=1; r < Monthname4.length; r++) {
document.write("<br>" + r + ") " + Monthname4[r])
}
</SCRIPT>
</BODY>
</HTML>
I coded this sample htm to show that javascript can drop index values
without any error messages. Does anyone know why this would happen?
Thanks
Fred
sample htm to follow -->
<html>
<BODY>
<br>
<SCRIPT LANGUAGE="Javascript">
document.write ("Sample to show index as 2 digit number");
Monthname = new Array()
Monthname[01] = 'January';
Monthname[02] = 'February';
Monthname[03] = 'March';
Monthname[04] = 'April';
Monthname[05] = 'May';
Monthname[06] = 'June';
Monthname[07] = 'July';
Monthname[08] = 'August';
Monthname[09] = 'September';
Monthname[10] = 'October';
Monthname[11] = 'November';
Monthname[12] = 'December';
document.write ('<br>before for loop lgth=' + Monthname.length)
for (var r=1; r < Monthname.length; r++) {
document.write("<br>" + r + ") " + Monthname[r])
}
document.write ("<br><br>Sample to show index as 4 digit number - missing
Aug and Sept values");
Monthname4 = new Array()
Monthname4[0001] = 'January';
Monthname4[0002] = 'February';
Monthname4[0003] = 'March';
Monthname4[0004] = 'April';
Monthname4[0005] = 'May';
Monthname4[0006] = 'June';
Monthname4[0007] = 'July';
Monthname4[0008] = 'August';
Monthname4[0009] = 'September';
Monthname4[0010] = 'October';
Monthname4[0011] = 'November';
Monthname4[0012] = 'December';
document.write ('<br>before for loop lgth=' + Monthname4.length)
for (var r=1; r < Monthname4.length; r++) {
document.write("<br>" + r + ") " + Monthname4[r])
}
</SCRIPT>
</BODY>
</HTML>