Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Adding attribute to JavaScript validator object in the Page_Valida

Thread Tools

Adding attribute to JavaScript validator object in the Page_Valida

Posts: n/a
I have created a custom validator control that implements the
BaseValidator. However I would like to add an attribute to the
JavaScript validation object that is rendered at the bottom of the
page. Currently something like the following is at the bottom of the

var ctl00_MasterPages_MemberSelected = document.all ?
document.all["ctl00_MasterPages_MemberSelected"] :
document.getElementById("ctl00_MasterPages_MemberS elected");
ctl00_MasterPages_MemberSelected.errormessage = "This is an error
ctl00_MasterPages_MemberSelected.display = "Dynamic";
ctl00_MasterPages_MemberSelected.validationGroup = "ValidationGroup";

I would like to add attributes to this object, for example:

ctl00_MasterPages_MemberSelected.newAttributeOne = "Attribute1";
ctl00_MasterPages_MemberSelected.newAttributeTwo = "Attribute2";

Does anyone know how this can be done?

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
class object's attribute is also the instance's attribute? 陈伟 Python 9 08-30-2012 03:20 PM
Struts Validator - creditCard validator Java 4 02-13-2007 08:32 PM
ATTRIBUTE ERROR: 'module' object has no attribute 'ssl' johnny Python 5 12-10-2006 01:10 PM
Adding attribute to JavaScript validator object in the Page_Validators array Jim Ox ASP .Net 1 06-22-2006 07:54 PM
Adding attribute to object marco Python 2 12-04-2003 01:01 AM