Validator code loaded on page

T

tshad

When you use Validators, it increases the size of the page and adds the
following code to your page:

<script language="javascript" type="text/javascript">
<!--
var Page_ValidationActive = false;
if (typeof(clientInformation) != "undefined" &&
clientInformation.appName.indexOf("Explorer") != -1) {
if ((typeof(Page_ValidationVer) != "undefined") && (Page_ValidationVer
== "125"))
ValidatorOnLoad();
}

function ValidatorOnSubmit() {
if (Page_ValidationActive) {
return ValidatorCommonOnSubmit();
}
return true;
}
// -->
</script>

But some sites just refer to a .js file and the code is not added to the
page, but the code is working as client side code.

For example, DW has objects they call Sprys that do things such as
validations for various object such as textboxes and will shade the textbox
to grey when entering the object then change the object to red on leaving as
well as putting error messages if possible. All of this is happening on the
client page.

The only thing that seems to be getting added is something like:

<script src="../SpryAssets/SpryValidationTextField.js"
type="text/javascript"></script>
<script src="../SpryAssets/SpryValidationTextarea.js"
type="text/javascript"></script>
<script src="../SpryAssets/SpryValidationSelect.js"
type="text/javascript"></script>

<!--
var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1",
"none", {validateOn:["blur", "change"]});
var sprytextarea2 = new Spry.Widget.ValidationTextarea("sprytextarea2",
{validateOn:["blur", "change"], counterId:"countsprytextarea2",
minChars:150, var spryselect5 = new
Spry.Widget.ValidationSelect("spryselect5", {isRequired:false,
validateOn:["blur", "change"]});
//-->
</script>

But there is no code to execute and you can't see what it is doing.

If I add anthem (ajax) to my pages it adds a ton of code to the page.

Why is it that Spry doesn't add the code to the page? I would like to build
my javascript into a .js file that doesn't load on the page (just refer to
it).

Thanks,

Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top