XSLT bugs in Opera

wxdqz

New Member
Here's another bug that I've already reported to the Opera staff. Run the code below and submit the form. An onsubmit handler alerts you of the number of forms in the document and refuses to submit. This number should have been 1, but it's 0 in Opera. In IE it's 1. If I take away the handler and let you submit the form, it is indeed submitted but no data is transferred to the server. The problem is not just about forms. If I remove the form and write a hyperlink instead and ask for the number of such in the doc, the answer is again 0 in Opera. The problem seems to be that no data structures at all are created. I even added doctype and name space and it doesn't help.

Has anyone here seen this before? Do you know of a work-around?


<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href=http://www.webdeveloper.com/forum/archive/index.php/"bug.xsl"?>

<kontakt>webmaster</kontakt>

-----------

bug.xsl :

<?xml version="1.0" encoding="ISO-8859-1"?>

<xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output method="html" omit-xml-declaration="yes" indent="no"
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"/>

<xsl:template match="kontakt">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>bug</title>
<script type="text/javascript">
function sjekk()
{
alert(document.forms.length);
return false;
}
</script>
</head>
<body>

<form name="skjema" action="kontakt.pl" method="post" onsubmit="return sjekk()">
<input type="text" name="fra"/>
<button type="submit">Send!</button>
</form>

</body>
</html>

</xsl:template>

</xsl:transform>
 
Back
Top