Forum Moderators: open

Message Too Old, No Replies

Javascript Syntax Error 0

Code inside

         

gueido

2:54 am on Oct 15, 2009 (gmt 0)

10+ Year Member



I will post the error message, and the snippet of code from the file in question.

Error:
Message: Syntax error
Line: 1
Char: 1
Code: 0
URI: http://example.com/wp-content/plugins/contact-form-7/contact-form-7.js?ver=2.0.js

Code Snippet:

<script type="text/javascript">
function toUnicode(elmnt,content){
if (content.length==elmnt.maxLength){
next=elmnt.tabIndex
if (next<document.forms[0].elements.length){
document.forms[0].elements[next].focus()
}
}
}
</script>

Any help with would greatly appreciated. Oh by the way in the code snippet, that is the first 10 lines.

Thanks in advance!
Casey

daveVk

7:03 am on Oct 15, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



<script type="text/javascript">
and
</script>

not required in external js code ( not encoded within html )

gueido

9:40 pm on Oct 19, 2009 (gmt 0)

10+ Year Member



So I don't need this at all? I should be able to take that out and it will work fine in IE, Opera, FireFox, and Chrome?

daveVk

1:47 am on Oct 20, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, the script tag is used within html to enclose the javascript, or to include a javascript file. It is part of html, rather than part of the javascript.