469,603 Members | 2,069 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,603 developers. It's quick & easy.

Expected ';'

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

Oct 24 '05 #1
1 1408
In article <11**********************@g44g2000cwa.googlegroups .com>,
th*********************@gmail.com says...
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>


Change "Smith" to 'Smith'.

--

Hywel
http://kibo.org.uk/
Oct 24 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Bill | last post: by
5 posts views Thread by andy.herrera | last post: by
3 posts views Thread by Jon | last post: by
reply views Thread by devrayhaan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.