Closed Bug 117529 Opened 23 years ago Closed 23 years ago

When page is rendered as transtition without any changes the javascript will work, however since it is a XHTML and I chage it to a XHTML 1.0 doctype the Javascript does not work.

Categories

(Core :: JavaScript Engine, defect)

x86
Linux
defect
Not set
normal

Tracking

()

VERIFIED INVALID

People

(Reporter: michael, Assigned: rogerl)

References

()

Details

From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.6) Gecko/20011202 BuildID: 0.9.7 The page at http://technologyreview.org:8080/index.en.shtml should have a scrolling "News" bar on the left, right under the "Reviews" bar. Also when you click on one of the links found in the middle section a box should appear and grow though the page. Now, index.en.shtml, is a XHTML, and therefor has the XHTML 1.0 doctype. However if I were to change the doctype to a transition HTML 4.0 doctype the page renders corrects, can be seen here: http://technologyreview.org:8080/index.shtml. The Javascript used in both examples is externally linked and does not suffer from forgetting <[![CDATA and all is valid XHTML. Reproducible: Always Steps to Reproduce: 1.Go to the web page 2.See that it does not rendered Actual Results: You would see the page rendered without the Javascript enhancement Expected Results: Go here for expected results: http://technologyreview.org:8080/index.shtml
The page renders fine with a 4.0 Transitional doctype because that doctype triggers "quirks" mode. An XHTML doctype triggers "standards" mode. In standards mode, we do our best to follow the CSS, HTML, and DOM specs (in "quirks" mode we violate these specs at times to be compatible with old pages). In particular, the CSS standard requires that all lengths have units. so "5" is not a valid length value, whereas "5px" is. The js in question does things like: maxp=scrtext.offsetHeight?scrtext.offsetHeight:scrtext.style.pixelHeight; if (sp<-maxp) sp=0; sp--; scrtext.style.top=sp; note that "sp" is a number, so not a valid CSS length. So the setting of style.top fails in "standards" mode. Marking invalid. Mike Petnuch, please reopen if you fix the problems with your JavaScript and things still don't work.
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → INVALID
Summary: When page is rendered as transtition without any changes the javascript will work, however since it is a XHTML and I chage it to a XHTML 1.0 doctype the Javascript does not work. → When page is rendered as transtition without any changes the javascript will work, however since it is a XHTML and I chage it to a XHTML 1.0 doctype the Javascript does not work.
Marking Verified -
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.