jQuery in IE: onClick Vs. onChange (aka: Another one o' those "things")

Wed, 06/17/2009 - 11:14 -- Aaron Lundborg

You ever see the movie "Pushing Tin" where the air-traffic-controllers get into "things"?

"Things" (maybe "near misses" would be a better term?) happen due to neglect and/or ignorance on the part of the air traffic controller. Like, maybe he or she isn't paying close enough attention to their screen and a couple of planes get too close to each other. That's a "thing". And they aren't good.

I'm not an air traffic controller though and that's a good thing as today was my first dedicated foray into browser testing on Vmware Server. I've used it before but not out of necessity since we have the obligatory "Windows Box" for that. (Seems our "Windows Box" decided to magically excorcise itself of IE Dev Toolbar, however...and still to this minute, I have no idea why it isn't working. I tried this and something else that I don't remember but decided to stop the insanity and move to vmware). For the record, the insanity didn't exactly end. Just change. So let's get to it:

    Issue 1
  • There's no decent way to disconnect oneself from a full screen RDPV5 tsclient connection. (And I like a full screen. Yeah, I said it).
    1. I tried the key-commands.....f8, ctrl+f8, the arrow key stuff, even killed X a couple of times doing it. 
    2. Huge bummer.

Actually, I decided the easiest way was to use the "Start" button (I think it was a series of "Start">"Disconnect", and finally, "Yes" to disconnect) in Windows Explorer but that involved more clicks than I'd like to use. And a guys wrist only has so many clicks in it.

Seriously, though, is there a better way? Because the 64 Bit Bomb was not having it! And this never really got solved....Boy was I glad for that "Start Button Workaround" though. Yippee. [Aaron's wrist makes loud, painful-sounding click. Bird crashes into window]

Actually, come to think of it........speaking of the 64 Bit Bomb.....what's the deal with Firefox and Firebug's display:block "toggler"? I can kill Firefox every time by toggling "display:block" on and off. Something about that event mangles the layout of every page so bad that I have to restart the whole profile. Some sort of javascript "seizure", I guess. And, yes, I'm willing to bet it's an offending add-on too.....just never took the time to test it. Probably should.

Anyway, so while using Windows XP on vmware (where there was still a working IE Dev Toolbar), I was off and running. That was until, of course, I realized that my IE page-views seemed to be being cached. (Not very helpful for testing). So, imagine this process:

  1. Look at the page in IE/vmware on Mazama (aka the 64 Bit Bomb).
  2. Sign off using the Start>Disconnect>"yes, I'd like to disconnect"-routine (remember, there is no decent way out of a full-screen, tsclient connection).
  3. Tweak some css on Mazama.
  4. Fire up tsclient again (while still on Mazama....you get the point).
  5. Sign on to vmware server again.
  6. Load the page in IE.
  7. ....and finally decide to tweak some more css(which meant going thru the whole Start>Disconnect>"yes,I'd like to disconnect"-routine to get back to Mazama again), only to then realize that the page wasn't changing!

And yes, I can hear you now. Anyone in their right mind would say, "Yeah, that's because you don't have the browser set to reload every time you visit the page, genius!!!".

I was knee-deep in a "thing" though. I think that the above process had robbed me of any sort of rational thinking for the moment. Thankfully John heard me swearing from across the street and promptly pointed out my foolish ways. Really though, my wrist must've been 1000 degrees at this point.

Ok, so issue 2......

    Issue 2 (and you're free to read this in a Andy Rooney voice:)
  • What's the deal with jquery's change() function and radio buttons in IE7?
    1. You gotta use click()?
    2. But that's not what I want to use!
    3. I want the function to fire only on change! Not on click!
    4. Why am I putting this in a list?
    5. Because I like lists, that's why.

Again, in walks co-worker/all-around smart guy, Jason who helped me do some quick detective work to nail down someone with the exact same problem. First listing too. (Although with all of these IE "eccentricities" it seems pretty common, fortunately......or unfortunately, I suppose, depending on how you look at it).

But ok. Enough geek-rant.

There's a difference between click and change though.

Just sayin.

Tags: 

Comments

Submitted by Mohsina (not verified) on

I just want to know, which is the best between Onclick, Onchange & OnBlur for a combo box/ list items. Please, also tell me the proper reason!!!!!

Submitted by gianna michaels (not verified) on

From what i know:

+ onClick event handler

A click event occurs when an object on a form is clicked. The onClick event handler executes JavaScript code when a click event occurs.

+ onChange event handler

A change event occurs when a select, text, or textarea field loses focus and its value has been modified. The onChange event handler executes JavaScript code when a change event occurs.

+ onBlur event handler
A blur event occurs when a select, text, or textarea field on a form loses focus. The onBlur event handler executes JavaScript code when a blur event occurs.

Personally, i often use onClick for my websites.

Add new comment

Customer Feedback

I had the privilege of working with John and Freelock in launching a new Little League website. The process was flawless and the end product was magnificent exceeding our expectations. John knows his stuff! He had a wonderful ability to bring the perfect solution to our community based organization. Being volunteer run, we needed some special considerations in the way our website works, John understood this and delivered solutions that were perfect for us. We now have a cool website that also has the ability to grow with us into the future. I highly recommend John Locke and Freelock Computing.

Brian Boone
Pacific Little League

Need More Freelock

       

About Freelock

We are located in Pioneer Square, in downtown Seattle. 83 Columbia Street #401 Seattle, WA 98104  USA [P] 206.577.0540 Contact Us/Directions | Site Map Get Updates ©1995-2011 Freelock Computing