I’ve found following javascript library for client-side validation:
The examples on the website are very clear, but I just can’t get them to work…
Even when creating a very basic html-only website like this:
<html>
<head>
<link rel="scrip" type="text/javascript" href="scripts/LiveValidation-1.3.js" title="LiveValidation"/>
</head>
Enter the field then click somewhere else:
<input type="text" id="f1"/>
<script type="text/javascript">
var f1 = new LiveValidation('f1');
f1.add(Validate.Presence);
</script>
</html>
This code comes directly from the examples provided on the website, however it doesn’t do anything, the reference to the .js file is correct… What am I overlooking here? Thanks.
You need to use a script tag to reference the javascript file not the link tag.