What event are you using for activating your validation? onBlur? As for the second question, you have the full power of Java OO programming available. So either extend TextBox, or make a Composite widget containing a textbox, that encapsulates what you want, maybe ValidatingTextBox. Give it a mechanism for generically validating, maybe a callback class or whatever, and based on the result add your coloring/popups/etc. Then instantiate it for each field, with each particular validating callback. BTW I'd avoid alert as it locks your browser, requires an extra user click, and isn't very pleasant; maybe use a Popup below the textbox instead.
On Apr 9, 12:05 pm, Vik <vik....@gmail.com> wrote: > Hie > > Please have a look > at:http://1.latest.sakshumweb20.appspot.com/ui/page/DonorRegister.jsp > > <http://1.latest.sakshumweb20.appspot.com/ui/page/DonorRegister.jsp>Click on > the first name field. and then tab out without entering anything. > In firefox the field background becomes red but it does not happen in > chrome. > > Any reasons why the difference in behavior? and how to fix it? > > One more thing right now i am showing the error message as a window alert. > Is there a generic way to mark the component in red and show a error near to > it? > Programmatically doing it will be a lot of effort for all the ui components. > > Thankx and Regards > > Vik > Founderwww.sakshum.comwww.sakshum.blogspot.com -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.