469,927 Members | 1,592 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,927 developers. It's quick & easy.

validator SPANS have visibility:hidden. ARGH!

I'm using some validators for a form.

I'm noticing that it writes the text out to the browser as a SPAN with it's
visibility set to none. The problem is that it still takes up space, so I
have gigantic gaps in my form. It SHOULD be set to display: none instead. Is
this a setting in the control somewhere or is this just a huge oversight on
MS's part?

If the latter, any suggestions for a workaround? Perhaps wrapping the
validator in a label and only showing the label if the validator returns
something?

-Darrel
Nov 18 '05 #1
6 4770
The easiest workaround i found is to disable client validation.

George
My Site - Body Jewelry
"darrel" <no*****@hotmail.com> wrote in message news:%2****************@tk2msftngp13.phx.gbl...
I'm using some validators for a form.

I'm noticing that it writes the text out to the browser as a SPAN with it's
visibility set to none. The problem is that it still takes up space, so I
have gigantic gaps in my form. It SHOULD be set to display: none instead. Is
this a setting in the control somewhere or is this just a huge oversight on
MS's part?

If the latter, any suggestions for a workaround? Perhaps wrapping the
validator in a label and only showing the label if the validator returns
something?

-Darrel
Nov 18 '05 #2
> The easiest workaround i found is to disable client validation.
Ugh. So, this seems to be another example of MS half-assing it, eh?

;o)

Looks like I might just kill the client-side validation and write that end
myself. (grumble, grumble...)

-Darrel
Nov 18 '05 #3
darrel wrote:
The easiest workaround i found is to disable client validation.


Ugh. So, this seems to be another example of MS half-assing it, eh?

;o)

Looks like I might just kill the client-side validation and write that end
myself. (grumble, grumble...)

-Darrel

The validators only work on the clientside in IE, so I find myself using
the DOMValidators you can find on the web that someone wrote, that work
in all DOM-based browsers. Otherwise, you can always edit the .js files
yourself on the webserver, if feeling brave.

Do you have TextMode=Static (I think that's the property name on the
validator)? Try setting it to Dynamic instead. Then it'll collapse
those spaces....

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
Nov 18 '05 #4
> The validators only work on the clientside in IE

Really!? Argh. Yet another reason to scrap these things. Ugh.

As soon as I begin warming up to some of the niceties of .net, MS reminds me
how much .net ignores decent standards-based client-side
rendering/functionality
Do you have TextMode=Static (I think that's the property name on the
validator)? Try setting it to Dynamic instead. Then it'll collapse
those spaces....
Aha! Well, that fixed that issue.

so, it appears that:

display: static = span with visibility: hidden

display: dynamic = span with display: none

Why VS.NET couldn't just come out and SAY that instead of hiding it behind
the display property is what gets me. ;o)

Thanks, Craig!

-Darrel

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET

Nov 18 '05 #5
Hi Darrel,

I rewrote the ASP.NET validation framework because I found so many
limitations with it, including the lack of client-side validation on
DOM-based browsers. My solution is available to others: "Professional
Validation And More" (http://www.peterblum.com/vam/home.aspx)

Even if you do not want a replacement, please use this URL to learn about
the limitations as you plan your validation design:
http://www.peterblum.com/vam/valmain.aspx.

--- Peter Blum
www.PeterBlum.com
Email: PL****@PeterBlum.com
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx

"darrel" <no*****@hotmail.com> wrote in message
news:ut**************@TK2MSFTNGP12.phx.gbl...
The validators only work on the clientside in IE
Really!? Argh. Yet another reason to scrap these things. Ugh.

As soon as I begin warming up to some of the niceties of .net, MS reminds

me how much .net ignores decent standards-based client-side
rendering/functionality
Do you have TextMode=Static (I think that's the property name on the
validator)? Try setting it to Dynamic instead. Then it'll collapse
those spaces....


Aha! Well, that fixed that issue.

so, it appears that:

display: static = span with visibility: hidden

display: dynamic = span with display: none

Why VS.NET couldn't just come out and SAY that instead of hiding it behind
the display property is what gets me. ;o)

Thanks, Craig!

-Darrel

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET


Nov 18 '05 #6
> I rewrote the ASP.NET validation framework because I found so many
limitations with it, including the lack of client-side validation on
DOM-based browsers. My solution is available to others: "Professional
Validation And More" (http://www.peterblum.com/vam/home.aspx)


Peter:

Excellent! Thanks so much for that contribution to the community!

-Darrel
Nov 18 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by Max M | last post: by
3 posts views Thread by The Plankmeister | last post: by
16 posts views Thread by J. J. Cale | last post: by
12 posts views Thread by Vadim | last post: by
9 posts views Thread by Steven Bethard | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.