473,320 Members | 1,940 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Autocomplete cuasing problems with client side validation controls

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
8 3313
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
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
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Rick | last post by:
I have an interesting problem when I run the following code in Netscape (7.02) vs. IE. This page works great in IE and all my controls bring up the validation summary dialog box if the required...
3
by: Gareth | last post by:
Hi, I've just published a test web site on the internet with a simple form and some client side validation controls. On my development PC if I click submit without entering any data the validation...
4
by: | last post by:
Hello Guys, I am using the validation controls to validate my data. But the problem is "The page is still being posted to server". I want to get rid of the round trips to server. Are there...
14
by: Matt | last post by:
I want to know if ASP.NET Web Forms Validation Controls are Server-Side or Client-Side form validation? Since I think each validator control can select either 1) JavaScript based error dialog or 2)...
3
by: Earl Teigrob | last post by:
I wanted my "Terms and Conditions" Checkbox control to participate in my ASP.NET validation just like all the the other controls on the page. After some time of searching the web for an example of...
7
by: moondaddy | last post by:
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...
5
by: Sun Jian | last post by:
Hi, I am trying to customize the asp.net validation to achieve the following: Upon submitting the form, client side validation will run, and it will stop at the first error detected. For...
1
by: Hong Hao | last post by:
Recently, I was trying to modify an existing aspx page when client-side validation on that page stopped working. I searched this group and the web in general and found that other people have had...
0
by: parvaz.mahdabi | last post by:
I have some custom client side validation in an asp.net form, when autocomplete is enabled, the isvalid property of validation controls in javascript works incorrect.I use isValid property in order...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.