By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,562 Members | 1,242 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,562 IT Pros & Developers. It's quick & easy.

Autocomplete cuasing problems with client side validation controls

P: n/a
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?

--
mo*******@nospam.com
Nov 18 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a
You will have to catch the onblur, and revalidate the input.
-- bruce (sqlwork.com)

"moondaddy" <mo*******@nospam.com> wrote in message
news:Ox**************@TK2MSFTNGP12.phx.gbl...
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?

--
mo*******@nospam.com

Nov 18 '05 #2

P: n/a
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.

--
mo*******@nospam.com
"bruce barker" <no***********@safeco.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
You will have to catch the onblur, and revalidate the input.
-- bruce (sqlwork.com)

"moondaddy" <mo*******@nospam.com> wrote in message
news:Ox**************@TK2MSFTNGP12.phx.gbl...
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?

--
mo*******@nospam.com


Nov 18 '05 #3

P: n/a
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.

--
mo*******@nospam.com
"bruce barker" <no***********@safeco.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
You will have to catch the onblur, and revalidate the input.
-- bruce (sqlwork.com)

"moondaddy" <mo*******@nospam.com> wrote in message
news:Ox**************@TK2MSFTNGP12.phx.gbl...
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?

--
mo*******@nospam.com


Nov 18 '05 #4

P: n/a
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.

Nov 18 '05 #5

P: n/a
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.

Nov 18 '05 #6

P: n/a
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.

Nov 18 '05 #7

P: n/a
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!

--
mo*******@nospam.com
""Jeffrey Tan[MSFT]"" <v-*****@online.microsoft.com> wrote in message
news:X$*************@cpmsftngxa06.phx.gbl...
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.

Nov 18 '05 #8

P: n/a
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.

Nov 18 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.