i had a similar errof for a javascript..
the problem is putting var inside a function...
to solve it put the content of the javascript
inside
HTML Code:
<script type="text/javascript">
<vb:litteral>
var v_CompanyName = new LiveValidation( 'CompanyName', { validMessage: vMsg, onlyOnSubmit: true } );
v_CompanyName.add( Validate.Presence, { failureMessage: vFMsg } );
var v_StreetAddress = new LiveValidation( 'StreetAddress', { validMessage: vMsg, onlyOnSubmit: true } );
v_StreetAddress.add( Validate.Presence, { failureMessage: vFMsg } );
// truncated
var automaticOnSubmit = v_CompanyName.form.onsubmit;
v_CompanyName.form.onsubmit = function()
{
var valid = automaticOnSubmit();
if (!valid)
alert('One or more required fields were omitted or submitted with invalid values. Please review the form and ensure that you have filled out all of the required fields. Missing fields are highlighted in red.');
return valid;
}
</vb:litteral>
</script>
or other solution
declare the var valid;
outside of the function...
at the beginning of the script.. that should work also...
inside the function you then only have:
valid = automaticOnSubmit();
F-
The template parser just doesnt like the word var inside curly brackets.....