0

Handling IE clear textbox control

asked 2014-10-13 22:53:53 +0800

sahild gravatar image sahild
117 4

On IE, textboxes have a clear control on one end of the textbox. It looks like a small 'x'. This control clears all of the text from the textbox. How can I handle this control? I need to know when the user clears the textbox. I don't get an onClick, onFocus, onChanging event when I use this control. Is there a way to get an event when a users selects this control? Or is there a way to not have this control appear? I know this is a behavior of the browser, just looking for a solution to know when it is used.

delete flag offensive retag edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2014-10-26 21:22:06 +0800

Darksu gravatar image Darksu
1991 1 4

Hello sahild,

I believe it would be better if you removed this control.

You should set the following css:

input[type=text]::-ms-clear {
    display: none;
}

Best Regards,

Darksu

link publish delete flag offensive edit
0

answered 2014-10-31 14:58:34 +0800

sahild gravatar image sahild
117 4

Thanks Darksu

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2014-10-13 22:53:53 +0800

Seen: 25 times

Last updated: Oct 31 '14

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More