Closed
Bug 210715
Opened 21 years ago
Closed 21 years ago
Cannot use JavaScript + style attribute to change positioning of elements generated by XSLT
Categories
(Core :: DOM: CSS Object Model, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: dmmccaw, Unassigned)
Details
(Keywords: testcase)
Attachments
(4 files)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 When an XML document is transformed via XSLT, a javascript that runs onload of transformed document is unable to manipulate the coordinates, dimensions, or font-size of generated DIV elements, but it is able to change the background color. Saving the transformed source as HTML and viewing in Mozilla gives correct behavior. Reproducible: Always Steps to Reproduce: 1. Create an XML doc with an XSL stylesheet 2. In the stylesheet, include a script (linked or inline, no matter) to change coordinates of an element (position:absolute) 3. Preview the page in Mozilla Actual Results: Background color of the DIVs changed, but all of the elements stayed at 0,0 with * for width and height, and kept the default color and font-size. Expected Results: Should have allowed for dynamic placement and sizing of block level elements I am using the default theme w/ 1.4RC3, clean install. First time, so bear with me if I filed this in the wrong component. Working on testcase. What I was trying to do was take an XML file full of quotes I had created and transform it to an HTML file for viewing, placing the DIVs in randomly selected coordinates with random widths and colors, etc. Works if I take the transformed source and view it.
Reporter | ||
Comment 1•21 years ago
|
||
Reporter | ||
Comment 2•21 years ago
|
||
Reporter | ||
Comment 3•21 years ago
|
||
hope I got JS mime-type right...
Reporter | ||
Comment 4•21 years ago
|
||
last one, sorry about all the spam
Comment 5•21 years ago
|
||
You need to add +"px" when you set left/top/width/fontSize
Comment 6•21 years ago
|
||
This is invalid. XSLT-generated documents are always in standards mode, and in standards mode CSS lengths require a unit.
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•