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

Reply
Thread Tools

Adding attribute to JavaScript validator object in the Page_Valida

 
 
JimOx
Guest
Posts: n/a
 
      06-21-2006
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
page:

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
message";
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
 
 
 
Reply

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 smrimell@gmail.com 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



Advertisments