I have simple HTML Textbox with couple of events like "onfocus" change backgroud color, "onkeypress" making sure only accepting numerals, "onblur" formatting and validating the numerals to us-phone format, "onmouseover" showing the tooltip, "onmouseout" hiding the tooltip etc.
I want to manage all the events dynamically without using any 3rd party library (like prototype, jQuery,Dojo etc.). My browser is ONLY IE 6 and up. NO FIREFOX.
I am expecting code under the <body>
tag will be like
<input type="text" id="usphone" name="usphone" title="enter phone with area code" class="usphoneClass"/>
and code under <script>
tag something like below.
document.getElementByID('usphone').onfocus= ChangeBackgroudColor();
document.getElementByID('usphone').onkeypress= return isNaN();
document.getElementByID('usphone').onblur= formatUSPhone();validateUsPhone();ChangeColor();
document.getElementByID('usphone').onmouseover= showtooltip();
document.getElementByID('usphone').mouseout= hidetooltip();