Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Autocomplete cuasing problems with client side validation controls

Reply
Thread Tools

Autocomplete cuasing problems with client side validation controls

 
 
moondaddy
Guest
Posts: n/a
 
      04-01-2004
I have a form for entering a user's address and all fields have a required
validating control associated with them and the error msg for each field
displays right next to it. The normal behavior is that the error msg
doesn't show unit the use hits the submit button or the user enters data and
moves the focus to another control so the field becomes dirty. So far so
good. Now when the user goes back to that control and starts to input data
the auto complete feature kicks in and shows them a list of options. If the
user selects an item from the autocomplete list or keys in the exact same
text as an item in the list and then moves the focus away from the field the
error msg does NOT go away. However, it the user keys in new data not found
in the autocomplete list and then moves the focus away then the error msg
DOES go away. This behavior is inconsistent and if the error msg does not
go away when it should then it can be confusing or misleading to the user
where they may think the field is not valid. NOTE: even if the error msg
remains showing even when it should have disappeared because the field is
valid, the page IS valid and can be submitted.

I don't want to turn off autocomplete because filling out addresses is one
of those things that people have to do too often and a lot of time can be
save using this feature. I personally would be annoyed if I had to enter my
address in full all the time. However, the issue of this error msg not
disappearing when it should is also annoying and confusing.

Any good solutions?

--
http://www.velocityreviews.com/forums/(E-Mail Removed)


 
Reply With Quote
 
 
 
 
bruce barker
Guest
Posts: n/a
 
      04-01-2004
You will have to catch the onblur, and revalidate the input.


-- bruce (sqlwork.com)



"moondaddy" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I have a form for entering a user's address and all fields have a required
> validating control associated with them and the error msg for each field
> displays right next to it. The normal behavior is that the error msg
> doesn't show unit the use hits the submit button or the user enters data

and
> moves the focus to another control so the field becomes dirty. So far so
> good. Now when the user goes back to that control and starts to input

data
> the auto complete feature kicks in and shows them a list of options. If

the
> user selects an item from the autocomplete list or keys in the exact same
> text as an item in the list and then moves the focus away from the field

the
> error msg does NOT go away. However, it the user keys in new data not

found
> in the autocomplete list and then moves the focus away then the error msg
> DOES go away. This behavior is inconsistent and if the error msg does not
> go away when it should then it can be confusing or misleading to the user
> where they may think the field is not valid. NOTE: even if the error msg
> remains showing even when it should have disappeared because the field is
> valid, the page IS valid and can be submitted.
>
> I don't want to turn off autocomplete because filling out addresses is one
> of those things that people have to do too often and a lot of time can be
> save using this feature. I personally would be annoyed if I had to enter

my
> address in full all the time. However, the issue of this error msg not
> disappearing when it should is also annoying and confusing.
>
> Any good solutions?
>
> --
> (E-Mail Removed)
>
>



 
Reply With Quote
 
 
 
 
moondaddy
Guest
Posts: n/a
 
      04-02-2004
Thanks Bruce. Does this happen to lots to other developers as well? I
would think it happens a lot and if I start writing my own validation in the
onblur event then I'm loosing some of the benefit of using the validation
controls in the first place, and I'm also leaving myself more open to bugs
and problems with other browsers. MS, if you are listening, do you have any
further comments on this?

Thanks again.

--
(E-Mail Removed)
"bruce barker" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> You will have to catch the onblur, and revalidate the input.
>
>
> -- bruce (sqlwork.com)
>
>
>
> "moondaddy" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > I have a form for entering a user's address and all fields have a

required
> > validating control associated with them and the error msg for each field
> > displays right next to it. The normal behavior is that the error msg
> > doesn't show unit the use hits the submit button or the user enters data

> and
> > moves the focus to another control so the field becomes dirty. So far

so
> > good. Now when the user goes back to that control and starts to input

> data
> > the auto complete feature kicks in and shows them a list of options. If

> the
> > user selects an item from the autocomplete list or keys in the exact

same
> > text as an item in the list and then moves the focus away from the field

> the
> > error msg does NOT go away. However, it the user keys in new data not

> found
> > in the autocomplete list and then moves the focus away then the error

msg
> > DOES go away. This behavior is inconsistent and if the error msg does

not
> > go away when it should then it can be confusing or misleading to the

user
> > where they may think the field is not valid. NOTE: even if the error

msg
> > remains showing even when it should have disappeared because the field

is
> > valid, the page IS valid and can be submitted.
> >
> > I don't want to turn off autocomplete because filling out addresses is

one
> > of those things that people have to do too often and a lot of time can

be
> > save using this feature. I personally would be annoyed if I had to

enter
> my
> > address in full all the time. However, the issue of this error msg not
> > disappearing when it should is also annoying and confusing.
> >
> > Any good solutions?
> >
> > --
> > (E-Mail Removed)
> >
> >

>
>



 
Reply With Quote
 
Jeffrey Tan[MSFT]
Guest
Posts: n/a
 
      04-06-2004
Hi moondaddy,

Thanks for your feedback.

I can reproduce out your problem. I will spend some time to do some
research on this issue. Maybe I can find a better workaround for you.

Thanks for your understanding.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

 
Reply With Quote
 
Jeffrey Tan[MSFT]
Guest
Posts: n/a
 
      04-06-2004
Hi moondaddy,

Sorry for letting you wait for so long time.

After doing some research, I find that this is a known issue of IE
autocomplete function.

For Validation control, to do the client validation for certain html
element, it will use some client script function to "hook up" this html
element's change event, so that when the textbox's content is changed, it
can be notified.

But when the autocomplete is opened, if you select a different value
through autocomplete list, although the textbox content is changed, change
event will not fire for you.

The below javascript code proves this:

<INPUT type="text" name="abc" size="33" onchange="test()" id="abc">

<script language="javascript">
function test()
{
alert("abc");
}
</script>

So this issue is due to the IE issue, not the Validation control.

Actually, if you search in http://groups.google.com/ , you will find that
this is a frequently asked question, and many developers have met. From
these threads, you can see there are 2 ways to handle this issue, close
autocomplete or leverage onblur client event. Also, I have seen that you do
not want to close autocomplete function for your textbox, which will be
convinient for the customer. So I recommanded you leverage onblur event to
workaround this issue, I think it will not affect much to you.

Thank you for your patience and cooperation. If you have any questions or
concerns, please feel free to post it in the group. I am standing by to be
of assistance.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

 
Reply With Quote
 
Jeffrey Tan[MSFT]
Guest
Posts: n/a
 
      04-08-2004
Hi moondaddy,

Do you still have any concern on this issue? Does my reply makes sense to
you?

Please feel free to feedback, I will help you. Thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

 
Reply With Quote
 
moondaddy
Guest
Posts: n/a
 
      04-08-2004
Thanks for all of the work on this issue. I have completely redesigned the
page and am only using the summary validation control to show the error
msgs. However, this is only a quick fix for this page and I'll be crossing
this issue again soon, so I've saved your posting for future reference. I'm
very sure I'll be making use of it, so another big thanks for all of your
work!

--
(E-Mail Removed)
""Jeffrey Tan[MSFT]"" <(E-Mail Removed)> wrote in message
news:X$(E-Mail Removed)...
> Hi moondaddy,
>
> Do you still have any concern on this issue? Does my reply makes sense to
> you?
>
> Please feel free to feedback, I will help you. Thanks
>
> Best regards,
> Jeffrey Tan
> Microsoft Online Partner Support
> Get Secure! - www.microsoft.com/security
> This posting is provided "as is" with no warranties and confers no rights.
>



 
Reply With Quote
 
Jeffrey Tan[MSFT]
Guest
Posts: n/a
 
      04-08-2004
Hi moondaddy,

Thanks for your feedback.

I am glad I can help you. Ok, if you need further help, please feel free to
feedback, I will help you.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

 
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
How to execute client-side code _after_ client-side validation? Bogdan ASP .Net 2 06-09-2008 01:31 PM
Client side script after client side validation with asp.net 2.0 Boss302 ASP .Net 0 11-21-2006 08:43 AM
having problem with IE Autocomplete along with client side validation controls parvaz.mahdabi@gmail.com ASP .Net 0 11-06-2006 01:43 PM
Using both server side validation and client side validation =?Utf-8?B?dmlkeWE=?= ASP .Net 1 06-02-2005 09:45 PM
ASP.NET Web Forms Validation Controls are Server-Side or Client-Side Validation? Matt ASP .Net 14 01-30-2004 09:15 AM



Advertisments