Hello!
I'm trying to use an
output symbol with the script component, but I'm having a bit of a
problem.
My script file look
like this:
=============================================================
<?xml
version="1.0"?>
<!-- $Id: Publisher.script,v 1.4 2002/09/27 12:13:24 hship Exp $ -->
<!DOCTYPE script PUBLIC
"-//Howard Lewis Ship//Tapestry Script 1.2//EN"
"http://tapestry.sf.net/dtd/Script_1_2.dtd">
<!-- $Id: Publisher.script,v 1.4 2002/09/27 12:13:24 hship Exp $ -->
<!DOCTYPE script PUBLIC
"-//Howard Lewis Ship//Tapestry Script 1.2//EN"
"http://tapestry.sf.net/dtd/Script_1_2.dtd">
<script>
<let
key="test">
function test() {
var x = 0;
var y = 1;
if (x < y)
document.write("<p>Testing, x</p>");
else
document.write("<p>Testing, y</p>");
}
</let>
function test() {
var x = 0;
var y = 1;
if (x < y)
document.write("<p>Testing, x</p>");
else
document.write("<p>Testing, y</p>");
}
</let>
<body/>
<initialization/>
<initialization/>
</script>
=============================================================
When I want to use
this script I get a complain about the < and the > so I enclose the
function in a CDATA section. But now the problem is when I try to output the
function to the html page, the < and > is converted to < and
>. This is ok for viewing, but when the javascript contains "if (x
< y)" the browser shudders and spits out an error
dialog.
Is there some way
around this?
regards,
Niklas
niklas.ekman
citat solutions | phone +46 (0)31 710 72
12
kronhusgatan 9, SE-411 05
g�teborg, sweden,
[EMAIL PROTECTED]
