validator SPANS have visibility:hidden. ARGH!

D

darrel

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
 
G

George

The easiest workaround i found is to disable client validation.

George
My Site - Body Jewelry
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
 
D

darrel

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
 
C

Craig Deelsnyder

darrel said:
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....
 
D

darrel

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



 
P

Peter Blum

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: (e-mail address removed)
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx

darrel said:
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



 
D

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)

Peter:

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

-Darrel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,054
Latest member
LucyCarper

Latest Threads

Top