First of all, 'Posse?' Passé

Cordelia ,'Potential'


Buffistechnology 2: You Made Her So She Growls?  

Got a question about technology? Ask it here. Discussion of hardware, software, TiVos, multi-region DVDs, Windows, Macs, LINUX, hand-helds, iPods, anything tech related. Better than any helpdesk!


tommyrot - Nov 15, 2005 10:54:24 am PST #5570 of 10003
Sir, it's not an offence to let your cat eat your bacon. Okay? And we don't arrest cats, I'm very sorry.

In a web page, why does the javascript onblur event get fired for a select combobox when I hit the 'Esc' key after typing into the select combobox?


Eddie - Nov 15, 2005 10:59:57 am PST #5571 of 10003
Your tag here.

In a web page, why does the javascript onblur event get fired for a select combobox when I hit the 'Esc' key after typing into the select combobox?

The onblur event fires when a control loses focus. Hitting the Esc key causes it to lose focus (IIRC).


tommyrot - Nov 15, 2005 11:09:32 am PST #5572 of 10003
Sir, it's not an offence to let your cat eat your bacon. Okay? And we don't arrest cats, I'm very sorry.

Well, that's... dumb counterintuitive.

Huh. The onChange event fires too. That's less counterintuitive, but still not what I want.

OK, so I need to use the onKeyDown or onKeyPress events to set a flag when the user hits escape, which will tell the functions that the onChange and onBlur events call to do nothing for that case. Then I need to reset the flag back. It's that setting the flag back part that bugs me - I can't think of a non-kludgey way to do it. And it needs to be set back after all the events are done firing.


Eddie - Nov 15, 2005 11:54:57 am PST #5573 of 10003
Your tag here.

If memory serves, the events are fired in order, so you could try setting the flag back in the last event. I can't find a definitive listing of the event order offhand, but I'm sure a little experimenting will tell you where to put it.

I'm thinking something like this at the top of the last event's function:

if ($flag) { $flag = 0; return; }

One other thing you might try from the onkeypress event's function is to set the subsequent events to null:

document.[formname].[controlname].onblur = null; document.[formname].[controlname].onchange = null;

I'm not sure if that'll kill those events for good, or for just that execution, so play around with it.

Not sure if I'm being helpful, but maybe it'll give you some ideas.


tommyrot - Nov 15, 2005 12:39:38 pm PST #5574 of 10003
Sir, it's not an offence to let your cat eat your bacon. Okay? And we don't arrest cats, I'm very sorry.

Thanks Eddie.

My boss and I messed around with it, and he decided that the whole thing was just too complicated to mess around with just to fix a tiny bug. (There's pages of code associated with just that one select combobox.)


§ ita § - Nov 15, 2005 4:09:49 pm PST #5575 of 10003
Well not canonically, no, but this is transformative fiction.

My Powerbook's Bluetooth is erratic. As in, not there when I need it. Last time it took a lot of rebooting to get it to act right again.

Where does one start troubleshooting that? With support, or is there anything I can do myself?


tommyrot - Nov 16, 2005 5:27:02 am PST #5576 of 10003
Sir, it's not an offence to let your cat eat your bacon. Okay? And we don't arrest cats, I'm very sorry.

ita, I had the exact same problem (which got worse and worse), except it was with the Bluetooth device itself (an Apple wireless keyboard). I know this because another Bluetooth device (Apple mouse) continued to work fine. (This was with my Mini, using a USB Bluetooth thingie plugged into the Mini.)

So, have you confirmed that the problem is with the Powerbook, and not the external device?


§ ita § - Nov 16, 2005 5:29:07 am PST #5577 of 10003
Well not canonically, no, but this is transformative fiction.

have you confirmed that the problem is with the Powerbook, and not the external device?

Yup. I can't get my phone or PDA to talk to it right now, and they both talk to each other and the PC just fine.

Also, when I change Bluetooth settings on the Powerbook, it takes a really long time. The little runic B on that top bar stays highlighted for a couple minutes if I do something like change the status of discoverability. That's new. And disheartening.


tommyrot - Nov 16, 2005 5:32:39 am PST #5578 of 10003
Sir, it's not an offence to let your cat eat your bacon. Okay? And we don't arrest cats, I'm very sorry.

I'd recommend taking it to a Genius Bar (which I think all Apple Stores have). That way they can look at it right there, and either fix it for you or tell you that it needs to be sent in or whatever.

Apple.com also has a lot of FAQs and message boards devoted to support (although it can be a pain to search through the message boards).


tommyrot - Nov 16, 2005 5:34:09 am PST #5579 of 10003
Sir, it's not an offence to let your cat eat your bacon. Okay? And we don't arrest cats, I'm very sorry.

How do you deauthorize music purchased from iTunes Music Store for a particular computer, if the computer is completely dead? (eta: Computer in question is a PC.)