Closed
Bug 311739
Opened 20 years ago
Closed 15 years ago
DOM component linkss not properly displayed.
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
INCOMPLETE
People
(Reporter: zeeman, Unassigned)
Details
Attachments
(1 file)
3.95 KB,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7
I wrote the following Javascript to display a calendar. I inserted the debug
code with the <!-- --> lines to show what the links were.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta name="generator" content="Adobe GoLive">
<title>lilcal</title>
<script language="javascript" type="text/javascript">
<!--
var mthName = new Array(
"January","February","March","April","May","June","July","August","September","October","November","December");
var mthDay = new Array( 31,28,31,30,31,30,31,31,30,31,30,31);
function getMthDyMax( yr, mth)
{
// Test for leap year when February is selected.
if (1 == mth)
return ((0 == yr % 4) && (0 != (yr % 100))) ||
(0 == yr % 400) ? 29 : 28;
else
return mthDay[ mth];
}
function AdjMthYr( adj)
{
if( adj > 0)
{
wrkMth++;
if( wrkMth == 12)
{
wrkMth = 0;
wrkYr++;
}
}
else if( adj < 0)
{
wrkMth--;
if( wrkMth == -1)
{
wrkMth = 11;
wrkYr--;
}
}
return;
}
function DispMthYr()
{
document.getElementById("mthyr").childNodes[0].nodeValue = mthName[ wrkMth] +
" " + wrkYr;
return;
}
function DispDays( yr, mth)
{
var dt = new Date( yr, mth, 1);
var wdstart = dt.getDay();
var ptrTR = document.getElementById( "r1");
var ptrTD = ptrTR.getElementsByTagName( "td");
if( wdstart > 0)
{
for( var wdcnt = 0; wdcnt < wdstart; wdcnt++)
{
ptrTD[ wdcnt].childNodes[0].nodeValue = " ";
}
}
var mdcnt = 1;
for( wdcnt = wdstart; wdcnt < 7; wdcnt++)
{
ptrTD[ wdcnt].childNodes[0].nodeValue = mdcnt + "";
mdcnt++;
}
mdmax = getMthDyMax( yr, mth);
for( ptrTR = ptrTR.nextSibling; ptrTR != null; ptrTR = ptrTR.nextSibling)
{
<!-- --> ptr = ptrTR.nextSibling;
<!-- --> document.write( ptr+"<br/>");
<!-- --> document.write("================================<br/>");
for( ptrTD = ptrTR.childNodes[0]; ptrTD != null; ptrTD = ptrTD.nextSibling)
{
ptrTD.childNodes[0].nodeValue = (mdcnt <= mdmax) ? (mdcnt + "") : " ";
mdcnt++;
}
}
return;
}
function DispMth( adj)
{
AdjMthYr( adj);
DispMthYr();
DispDays( wrkYr, wrkMth);
return;
}
//-->
</script>
<style type="text/css">
.lilcal { font-family: Courier New, monospace;
font-size: 11px;
text-align: right; }
#caltop td { font-family: Courier New, monospace;
font-size: 11px;
text-align: center; }
#caltop td a { text-decoration: none; }
#calbody td { font-family: Courier New, monospace;
font-size: 11px;
text-align: right; }
#mthyr, .mthyr { font-family: Courier New, monospace;
font-size: 11px;
text-align: center;}
</style>
</head>
<body bgcolor="#ffffff">
<table id="caltop">
<tr>
<td><a href="javascript: void(0);" onclick="DispMth( -1);"><<</a></td>
<td id="mthyr" colspan="5">0</td>
<td><a href="javascript: void(0);" onclick="DispMth( +1);">>></a></td>
</tr>
<tr><td>S</td><td>M</td><td>T</td><td>W</td><td>T</td><td>F</td><td>S</td>
</tr>
<tbody id="calbody">
<tr
id="r1"><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr>
<tr
id="r2"><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr>
<tr
id="r3"><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr>
<tr
id="r4"><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr>
<tr
id="r5"><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr>
<tr
id="r6"><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr>
</tbody>
</table>
<script language="javascript" type="text/javascript">
<!--
var wrkDt = new Date();
var wrkMth = wrkDt.getMonth();
var wrkYr = wrkDt.getFullYear();
DispMthYr();
DispDays( wrkYr, wrkMth);
//-->
</script>
</body>
</html>
Reproducible: Always
Steps to Reproduce:
1. Run the above script
2.
3.
Actual Results:
After the calendar is displayed, the display shows 5 objects and text
alternating, then a null.
Expected Results:
After the calendar is displayed, the display should show 4 objects, then a null.
Comment 1•20 years ago
|
||
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b5) Gecko/20051008
Firefox/1.4.1 ID:2005100805
I don't see much wrong with it
Comment 2•20 years ago
|
||
Please attach a minimized testcase. It's not immediately clear what is so buggy
about the posted code.
Comment 3•15 years ago
|
||
This bug was reported on Firefox 2.x or older, which is no longer supported and will not be receiving any more updates. I strongly suggest that you update to Firefox 3.6.3 or later, update your plugins (flash, adobe, etc.), and retest in a new profile. If you still see the issue with the updated Firefox, please post here. Otherwise, please close as RESOLVED > WORKSFORME
http://www.mozilla.com
http://support.mozilla.com/kb/Managing+profiles
http://support.mozilla.com/kb/Safe+mode
Version: unspecified → 1.0 Branch
Comment 4•15 years ago
|
||
No reply, INCOMPLETE. Please retest with Firefox 3.6.3 or later and a new profile (http://support.mozilla.com/kb/Managing+profiles). If you continue to see this issue with the newest firefox and a new profile, then please comment on this bug.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → INCOMPLETE
Comment 5•15 years ago
|
||
No reply, INCOMPLETE. Please retest with Firefox 3.6.3 or later and a new profile (http://support.mozilla.com/kb/Managing+profiles). If you continue to see this issue with the newest firefox and a new profile, then please comment on this bug.
You need to log in
before you can comment on or make changes to this bug.
Description
•