Closed
Bug 170675
Opened 22 years ago
Closed 22 years ago
Javascript not working (as result of XSLT) eg. unload event
Categories
(Core :: XSLT, defect)
Core
XSLT
Tracking
()
RESOLVED
DUPLICATE
of bug 170097
People
(Reporter: dave.dyson, Assigned: peterv)
Details
I cannot get 'onload event' to work when executing javascript as a result of
XSLT. It works fine from a HTML page.
I enclose example below (it is based on example from fixed bug# 59912
test.html HTML page (works fine)
--------------------------------
<html>
<head>
<script type="text/javascript" src="test.js"></script>
</head>
<body onload="testload()">
My name : Dave Dyson<br/>
<A href="#" id="go1" class="bluebold" onclick="test1()">Check click</A>
</body>
</html>
test.js
-------
function test1()
{
alert("Test");
}
function testload()
{
alert("Testload");
}
*****************************
This does not execute onload (but onclick works) !!!!
test.xml
--------
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="test.xsl"?>
<test>
<login>
<login_name>Dave Dyson</login_name>
</login>
</test>
test.xsl
--------
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:html="http://www.w3.org/1999/xhtml">
<xsl:template match="/">
<html>
<head>
<script type="text/javascript" src="test.js"></script>
</head>
<body onload="testload()">
My name : <xsl:value-of select="//login/login_name" /><br/>
<A href="#" id="go1" class="bluebold" onclick="test1()">Check click</A>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
test.js
-------
function test1()
{
alert("Test");
}
function testload()
{
alert("Testload");
}
I am a bit puzzled (but properly ignorant) but I assumed that
after the XSL/XML is merged/transformed it produces HTML.
This HTML will then be processed by an HTML 'engine' - so don't understand
why the 'onload' works one way (starting from HTML page) and not page
generated from XSL/XML ?
Comment 1•22 years ago
|
||
It produces HTML, but it produces an HTML DOM, not HTML source...
Over to XSLT folks to decide whether that event should fire.
Assignee: asa → peterv
Status: UNCONFIRMED → NEW
Component: Browser-General → XSLT
Ever confirmed: true
OS: Windows 2000 → All
QA Contact: asa → keith
Hardware: PC → All
*** This bug has been marked as a duplicate of 170097 ***
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•