@Austin: You don't really need to catch that event from an alert since execution is suspended until the user closes it. So you can just write that code after the alert :) @ezCandlesticks: Yes the returnValue property is very useful too. Personally, i like it because you can use it with all kinds of events :)
Thanks, Teo On Thu, Sep 18, 2008 at 3:07 AM, ezCandlesticks <[EMAIL PROTECTED]>wrote: > > For anyone following this thread, I did just find this bit, which > could be used to cancel out the Tab key event. This is what I needed: > http://code.google.com/apis/desktop/docs/script.html#gadgeteventhandling > > Copied from that page: > * view.event.returnValue = false; //Disable the view event's > default behavior > * view.event.returnValue = true; //Enable the view event's default > behavior > > <edit onkeypress="edit_onkeypress()"/> > function edit_onkeypress() > { > if( event.keyCode == 'j' ) event.returnValue = false; > } > > Each time you press a key when control is inside this edit object, the > edit_onkeypress() function is called. If the key you press is j, then > since the event.returnValue is set to false, the event and its usual > return value are cancelled, making it as if the j was never pressed. > Effectively, this <edit> element doesn't allow you to type the letter > j. > > > > > -- Teo (a.k.a. Teodor Filimon, Teominator) Site - www.teodorfilimon.com | Blog - www.teodorfilimon.blogspot.com GMT +2 (or PDT +10) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Desktop Developer Group" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Desktop-Developer?hl=en -~----------~----~----~----~------~----~------~--~---
