471,071 Members | 1,516 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,071 software developers and data experts.

RequiredFieldValidator's Display="Dynamic" acts different when selecting from previously used entries

When testing a form of mine which uses RequiredFieldValidators that have the
Display property set to "Dynamic" the ErrorMessage property is automatically
removed when an entry is completely typed and the user leaves the textbox.
However, if the entry is selected from the list of previously typed entries,
the error does not disappear until the page is validated using the
Page.Validate() method. I find this very weird (not to mention it may be
confusing to visitors who use the form), since selecting from the list of
previously typed entries is supposed to be the same as typing something in.
Has anyone else noticed this? Is it simply a bug that will hopefully be
fixed in a future version of the .NET Framework? Is it only a problem with
IE (I am using IE 6.0 for my testing)? I would like to avoid this problem to
prevent confusion as to what is a valid entry, but I don't want to have to
postback to the server for every field in the form. Am I missing something?
Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/
Nov 19 '05 #1
1 2530
The autocomplete feature - the list of suggestions - does not fire the
onchange event on IE. This is an unfortunate feature of IE. The onchange
event is what the validators use to fire them when a field changes.

As the author of a replacement to the Microsoft validators, I have addressed
this by creating an improved TextBox control that has some extra javascript
to detect this case and fire my validators. ("Professional Validation And
More" at http://www.peterblum.com/vam/home.aspx)

Regardless of this limitation, you should have your server side code always
validate. Its simple. Just test Page.IsValid is true in the Click post back
event method. The reason to do it on the server side: client-side validation
is only designed around DHTML browsers (IE and IE/Mac) - my Professional
Validation And More supports many more - and javascript may be disabled on
the browser.

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

"Nathan Sokalski" <nj********@hotmail.com> wrote in message
news:eH**************@tk2msftngp13.phx.gbl...
When testing a form of mine which uses RequiredFieldValidators that have
the Display property set to "Dynamic" the ErrorMessage property is
automatically removed when an entry is completely typed and the user
leaves the textbox. However, if the entry is selected from the list of
previously typed entries, the error does not disappear until the page is
validated using the Page.Validate() method. I find this very weird (not to
mention it may be confusing to visitors who use the form), since selecting
from the list of previously typed entries is supposed to be the same as
typing something in. Has anyone else noticed this? Is it simply a bug that
will hopefully be fixed in a future version of the .NET Framework? Is it
only a problem with IE (I am using IE 6.0 for my testing)? I would like to
avoid this problem to prevent confusion as to what is a valid entry, but I
don't want to have to postback to the server for every field in the form.
Am I missing something? Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Andrew E | last post: by
3 posts views Thread by Bart Van Hemelen | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.