document.getElementById(sender.controltovalidate) attributes

Hi. I'm writing a Javascript subroutine for client side validation
using a custom validator.

I know I have the ".value" attribute available, and want to know that
other attributes I can access and how to show their values.

I expect they'll vary depending on the class of the controltovalidate,
but I was initially looking for the "header text" on a textbox which
is being validated.

Any help for a noob would be great.

Cheers
davey.phillips [ Fr, 18 April 2008 13:58 ] [ ID #1945115 ]

Re: document.getElementById(sender.controltovalidate) attributes

"DaveyP" <davey.phillips [at] gmail.com> wrote in message
news:50aba73f-53f6-4998-bf71-54bedc2622ac [at] f36g2000hsa.google groups.com...

> Hi. I'm writing a Javascript subroutine for client side validation
> using a custom validator.

OK.

> I know I have the ".value" attribute available, and want to know that
> other attributes I can access and how to show their values.

OK.

> I expect they'll vary depending on the class of the controltovalidate,

That's correct.

> but I was initially looking for the "header text" on a textbox which
> is being validated.

An <asp:TextBox> web control is rendered as an <input type='text'> HTML
control, neither of which as a "header text" property - can you explain what
you actually mean by this...?
http://msdn2.microsoft.com/en-us/library/fhc2c904.aspx
http://www.w3schools.com/TAGS/tag_input.asp


--
Mark Rae
ASP.NET MVP
http://www.markrae.net
mark [ Fr, 18 April 2008 14:16 ] [ ID #1945116 ]

Re: document.getElementById(sender.controltovalidate) attributes

DaveyP wrote:
> Hi. I'm writing a Javascript subroutine for client side validation
> using a custom validator.
>
> I know I have the ".value" attribute available, and want to know that
> other attributes I can access and how to show their values.
>
> I expect they'll vary depending on the class of the controltovalidate,
> but I was initially looking for the "header text" on a textbox which
> is being validated.

This is a good starting place:
http://www.w3schools.com/htmldom/dom_reference.asp

What properties are accessible to the JS will depend on the type of element. In
some cases there will be variance between browsers as well.

Chris.
Chris Shepherd [ Fr, 18 April 2008 14:21 ] [ ID #1945117 ]
Microsoft » microsoft.public.dotnet.framework.aspnet » document.getElementById(sender.controltovalidate) attributes

Vorheriges Thema: asp.net to php
Nächstes Thema: ASP.NET 3.5 AJAX and default error handler