Closed Bug 155084 Opened 23 years ago Closed 23 years ago

error in initialization of values in form

Categories

(Core :: DOM: Core & HTML, defect)

x86
Linux
defect
Not set
minor

Tracking

()

VERIFIED DUPLICATE of bug 127847

People

(Reporter: teafab, Assigned: jst)

References

()

Details

This page (http://www.trenitalia.it/home/it/index.html), when retrieved for the first time, should be initialized (in the left side) with current date and current time in this fashion : ---------------------------- Da dove vuoi partire? ( ......void...........) Dove vuoi arrivare? (.......void...........) Quando vuoi partire? (30) (06) (2002) A che ora? (17) (00) ----------------------------------------------- Instead, this page appear as follows ---------------------------- Da dove vuoi partire? ( ......void...........) Dove vuoi arrivare? (.......void...........) Quando vuoi partire? (void) (30) (06 ) A che ora? (20) (17) ----------------------------------------------- It seems that the initialization with current date & time got a shifting toward right. Note: the initialization is also uncorrect under Konqueror 2.2.2 and Links 0.97pre3 and Lynx Version 2.8.5dev.3 Instead, it's good in microsoft explorer 5
->DOM0
Assignee: rogerl → jst
Component: JavaScript Engine → DOM Level 0
QA Contact: pschwartau → desale
Confirming bug with Mozilla trunk binary 20020617xx on WinNT. The key frame is http://www.trenitalia.it/home/it/frame_orario.html function caricaTime() { var data = new Date(); var giorno = data.getDate(); var mese = data.getMonth(); var anno = data.getYear(); var ora = data.getHours(); var minuti = data.getMinutes(); if (navigator.appName=="Netscape") anno = 1900 + anno if (giorno<10) giorno = "0" + giorno if(mese<9) mese = "0" + (mese+1) else mese=mese+1; if(minuti<10) minuti = "0" + minuti document.forms[0].elements[4].value = giorno; document.forms[0].elements[5].value = mese; document.forms[0].elements[6].value = parseInt(anno,10); document.forms[0].elements[7].value = parseInt(ora,10); document.forms[0].elements[8].value = minuti; } Doing some debugging: javascript: alert(document.forms[0].name); ------------------> "clipart" javascript: alert(document.forms[0].elements[4].name); ------> "datam" in Moz ------> "datag" in IE6 Inside <form name="clipart"> there is a Shockwave Flash plug-in. This must be throwing off the elements order in Mozilla somehow. I think this is a dupe of another bug, but I can't find it yet -
Status: UNCONFIRMED → NEW
Ever confirmed: true
Yes, here it is. This is the exact same problem as in bug 138767, "Form field content appears to be shifted" That has been marked as a duplicate of bug 127847, "<object>'s not included in form.elements" I will do the same here. Fabio, thank you for this report, you will be cc'ed on bug 127847 - *** This bug has been marked as a duplicate of 127847 ***
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
Verified.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.