java - how to prompt user to get alert on press back space on focus out -


"itemprop =" text ">

After I press the focus area to focus on the loose area but my code slightly worms also promp hav user to signal Trying the user when he is typing his How do I get a problem Please help me please press Backspace during Public domain onBlur (field field) {println ("The new zone is not available"); onBlur "); call ();}}); . Add RootPanel.get () (T1); } Public resident zero call () / * - {// warning ("DFV"); $ Wnd.onkeypress = GetChar; Function GetChar (event) {var key = event.keyCode; If (key == 8) // check key key for backspace {var x = window.confirm ("Are you sure you want to leave the page"); If (x == true) {warning (window.history.back ())} and if (x == wrong) {return false; }}}

} - * /;

itemprop = "text">

try this one import com.google.gwt .event.dom.client.KeyCodes; Import com.google.gwt.i18n.client.DateTimeFormat; Import com.google.gwt.user.client.Event; Import com.google.gwt.user.client.Event.NativePreviewEvent; ... Event.addNativePreviewHandler (New Event.NativePreviewHandler) {@Override Public Zero onPreviewNativeEvent (Final NativePreviewEvent Event) {if (event.getTypeInt () == Event.ONKEYPRESS} {if (event.getNativeEvent (). GetKeyCode () == KeyCodes.KEY_BACKSPACE) {System.out.println ("backspace is pressed");}}}}); T1.sinkEvents (Event.ONKEYPRESS);

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -