I need to define a text box that accepts a string input. If the user enters a value thats invalid I want to display a warning but prevent him from taking focus away from that box unless he corrects the data input.
For example:
<input name="Textbox1" value="Hello World One" onchange="if (this.value == 'bug'){alert('Error: - 1'); return false;}"></input>
In this test if i enter 'bug' focus should not leave this field unless i change 'bug' to something else and I should get the alert each time i attempt to.
This input field works fine under IE6 but under firefox or IE 7.
I heard that IE 6 used standards that were not in compliance with W3C...I dont know if this is the reason why i have this problem :(
Hi, I posted this question in the area for JavaScript related questions but I felt maybe someone who focued more on HTML in general would be able to help.