Javascript error

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello All,

ASP.NET 1.1 and Visual Studio 2003.

I have a page which has few datagrids, validation controls and other server
controls. When the page is rendered in the browser I am seeing a javascript
error at the very bottom of the page. I am not using any custom javascript
code except for what is inherently generated by .NET framework.

When I tried debugging the javascript error using debugging tools for
windows, the debugger stopped at the "ValidatorOnLoad()" method in
WebUIValidation.js file.

function ValidatorOnLoad() {
if (typeof(Page_Validators) == "undefined")
return;
var i, val;
for (i = 0; i < Page_Validators.length; i++) {
val = Page_Validators;
if (typeof(val.evaluationfunction) == "string") { <-- DEBUGGER
stopped here
eval("val.evaluationfunction = " + val.evaluationfunction + ";");
}
if (typeof(val.isvalid) == "string") {
if (val.isvalid == "False") {
val.isvalid = false;
Page_IsValid = false;
}
else {
val.isvalid = true;
}
} else {
val.isvalid = true;
}
if (typeof(val.enabled) == "string") {
val.enabled = (val.enabled != "False");
}
ValidatorHookupControlID(val.controltovalidate, val);
ValidatorHookupControlID(val.controlhookup, val);
}
Page_ValidationActive = true;
}

Can anyone let me know what is the problem? Is it because of the validation
controls that I have on the page???

It is so frustrating to debug these generic javascript errors when you are
not using any custom code at all.

Thanks for any pointers!
 
Try Registering ASP.NET on IIS again using
aspnet_regiis -i

Hopefully that should work.
 
The following link did the trick for me:

http://www.velocityreviews.com/forums/t113038-a-bug-in-apsx-clientside-validation.html

I had a validation control which was commented using the <!-- --> tags.

Thanks for your pointer!

Ameet Phadnis(e Tek Global Inc.) said:
Try Registering ASP.NET on IIS again using
aspnet_regiis -i

Hopefully that should work.


--
Ameet Phadnis
Sr. Technical Consultant
e Tek Global Inc.
ASP Alliance Author Page: http://aspalliance.com/author.aspx?uId=44260


Diffident said:
Hello All,

ASP.NET 1.1 and Visual Studio 2003.

I have a page which has few datagrids, validation controls and other server
controls. When the page is rendered in the browser I am seeing a javascript
error at the very bottom of the page. I am not using any custom javascript
code except for what is inherently generated by .NET framework.

When I tried debugging the javascript error using debugging tools for
windows, the debugger stopped at the "ValidatorOnLoad()" method in
WebUIValidation.js file.

function ValidatorOnLoad() {
if (typeof(Page_Validators) == "undefined")
return;
var i, val;
for (i = 0; i < Page_Validators.length; i++) {
val = Page_Validators;
if (typeof(val.evaluationfunction) == "string") { <-- DEBUGGER
stopped here
eval("val.evaluationfunction = " + val.evaluationfunction + ";");
}
if (typeof(val.isvalid) == "string") {
if (val.isvalid == "False") {
val.isvalid = false;
Page_IsValid = false;
}
else {
val.isvalid = true;
}
} else {
val.isvalid = true;
}
if (typeof(val.enabled) == "string") {
val.enabled = (val.enabled != "False");
}
ValidatorHookupControlID(val.controltovalidate, val);
ValidatorHookupControlID(val.controlhookup, val);
}
Page_ValidationActive = true;
}

Can anyone let me know what is the problem? Is it because of the validation
controls that I have on the page???

It is so frustrating to debug these generic javascript errors when you are
not using any custom code at all.

Thanks for any pointers!
 
Back
Top