Powered By InputMask Evaluation Version
InputMask 3.5 Demos
© 1998-2010 Data Research Group. All rights reserved
Return To Menu
Using rich "in focus" design
Next Demo
ABOUT THIS DEMO:
The OnGotFocus and OnLostFocus events can be useful for providing a richer "in focus" design for your InputMask. Many developers already use these events on regular textboxes to show the user a colorful border or style that highlights the current element. Set focus on the InputMask controls below and notice the style changes. You can edit the javascript for each to update them to another style dynamically.
InputMask1
InputMask2
Javascript for InputMask1
function InputMask1_OnGotFocus(InputMask) { InputMask.style.border = "solid 2px orange"; } function InputMask1_OnLostFocus(InputMask) { InputMask.style.border = "solid 2px rgb(127,157,185)"; }
Javascript for InputMask2
function InputMask2_OnGotFocus(InputMask) { InputMask.style.border = "solid 2px yellow"; } function InputMask2_OnLostFocus(InputMask) { InputMask.style.border = "inset 2px"; }