T
throat.wobbler.mangrove
Hi,
I'm trying to use the following javascript in
an XSLT file:
<a>
<xsl:attribute name="href">
javascript:document.form1.surname.value="Smith";
</xsl:attribute>
Send Information
</a>
However, when I click the link I get an error " Expected ';' ". I don't
get this error however if I replace the javascript with
"form1.submit()" so I know it's definitely something to do with the
syntax of my line of javascript.
Things I have tried so far:
1. Using the js as part of an onclick instead (brings up the same error
but this time as soon as the page loads)
2. Removing the "document." before the form name
3. Actually getting rid of the semi-colon
4. Using ' instead of " to wrap the value
5. Using other field names
I'd be grateful if anyone had any ideas what's wrong, or if indeed I
really am missing a semi-colon from somewhere?
Many, many thanks
I'm trying to use the following javascript in
an XSLT file:
<a>
<xsl:attribute name="href">
javascript:document.form1.surname.value="Smith";
</xsl:attribute>
Send Information
</a>
However, when I click the link I get an error " Expected ';' ". I don't
get this error however if I replace the javascript with
"form1.submit()" so I know it's definitely something to do with the
syntax of my line of javascript.
Things I have tried so far:
1. Using the js as part of an onclick instead (brings up the same error
but this time as soon as the page loads)
2. Removing the "document." before the form name
3. Actually getting rid of the semi-colon
4. Using ' instead of " to wrap the value
5. Using other field names
I'd be grateful if anyone had any ideas what's wrong, or if indeed I
really am missing a semi-colon from somewhere?
Many, many thanks