cf.Objective

Speaking at cf.Objective

Recommended Books

Blog

Fun with Ajax and Firefox.

...and by "fun" I mean "WTF?!"

This code works just fine on Firefox 2.0.0.3 (on Windows XP):

view plain print about
1var pReq = createRequest();
2pReq.open( "GET", strURL, false );
3pReq.onreadystatechange = updateChildControls;
4pReq.send( null );

...updateChildControls() gets called just fine, and all is good.

Note, I deliberately called open() with the 3rd argument set to "false". It would take a while to explain, but this is actually creating the type of behavior in the UI that I'm hoping for, so this is intentionally a bit off from the norm (at least in most of my Ajax books).

However that same code does NOT run on Firefox 2.0.0.9 (on Windows XP), nor does it run on Firefox 2.0.0.6 on Ubuntu. No error messages on any of the machines. updateChildControls() simply never gets called!

I have to change it to this:

view plain print about
1pReq.open( "GET", strURL, true );

...which I find rather annoying.

Can anyone tell me WHY?! If we're not supposed to flip that 3rd argument to "false", then shouldn't it throw an exception? Give me a message in the Error Console? Something?

Maybe this is just what happens when trying to write code the day after Thanksgiving. Can I blame a chemical in the turkey? :)

TweetBacks
Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
I have actually always set it to true.
# Posted By spiraldev | 11/28/07 9:12 AM

Search

Recent Comments

Beginning Adventures in CentOS: Installing Apache and MySQL
Eden Crane said: What you are doing so far sounds good to me. 'su -' is good,... [More]

Flex training in San Francisco
John Gag said: Nice, hopefully I can come down and check out your presentat... [More]

Back from CFinNC!
Roger Austin said: There is a very good chance there will be CFinNC 2.0, but we... [More]

Beginning Adventures in CentOS: Installing Apache and MySQL
Eden Crane said: What you are doing so far sounds good to me. 'su -' is good,... [More]

Flex training in San Francisco
John Gag said: Nice, hopefully I can come down and check out your presentat... [More]

Back from CFinNC!
Roger Austin said: There is a very good chance there will be CFinNC 2.0, but we... [More]



BlogCFC was created by Raymond Camden. This blog is running version 5.9.7. Contact Blog Owner