isn't quite ashamed enough to present

jr conlin's ink stained banana

2004-07-28

:: I Am Disturbed By Your Lack Of JubJub

Ok, i admit it. i get the StarWars.com newsletter. Mostly because now-a-days it's like getting a regular update detailing the progress of the slow motion train wreck. Case in point, this little tidbit from the latest dispatch:

Ewoks and Droids on DVD — At the end of 2004, Lucasfilm and 20th Century Fox Home Video will release the 1980s Saturday morning animated adventures of Ewoks and Droids, as well as the live-action television movies The Ewok Adventure and Ewoks: The Battle for Endor.

Needless to say, i'm disappointed that this landmark series wouldn't include StarWars Holiday Special (including the hit "What do you get a Wookie for Christmas (when he's already got a comb)?")

*sigh*

That's the reason i don't find Star Wars quite as appealing. It occured to me that the fundemental difference between both sides is that the Empire wanted to kill off things like Gungans and Ewoks and the Rebels wanted to save them.

And again i cried when Lord Vader died.

Now those miserable fuzzy bastards are going to be around for ever. DAMN YOU LUKE SKYWALKER!

  1. 2004-07-29 09:50:10
    Plus the Empire had these really keen outifts while the Rebels all dressed like Punky Brewster.
Wanna join in?

:: What OnLoad of Crap.

Let me again say, i hate IE.

One of the pages broke, rather badly, i'd note, due to a rather annoying problem. Granted, i was having a helluva time thinking straight today, but that's beside the point. The crux of the problem was that we've got two seperate items that both want to be loaded as part of the javascript OnLoad command. They both do some setup that needs to occur after everything is properly configured, up and happy.

While i've got control over one of the items on the page, there occasionally are others i don't have control over that all dutifully set themselves as being the "Ultimate OnLoad Function" and generally screw things to the Sheboygan and back. These are sneaky little bastard functions that worm their way onto my page via all sorts of inadvertently malicious means.

So to solve this little issue once and for f*ing all, i decided that one of the very last things that the page would do is call my nice serialized initialization function that (in turn) called the various functions that all insist on being called at the "OnLoad" event.

One of the very last things occuring on the page is a script that does:
<script language="javascript">
window.onload=pageInit();
<script>

This, of course worked flawlessly in Mozilla, Firefox and Opera, but significantly less flawlessly in Internet Explorer, which complained that doing the above was "Not Implemented".

Not Implemented? You're kidding me, right?

Turns out that the "problem" is that i'm trying to overwrite the window.onload value already set earlier in the page, and that Microsoft in it's finite wisdom has determined that this might be bad. *grumble*

So, now that i've solved the problem for 99% of the browsers, i now have to solve the problem for the browser of 99%.

Turns out that Microsoft also uses an equally invalid hack to set a block of code to be executed on an event:
<script language="javascript" for="window" event="onLoad()">
pageInit();
</script>

As an added bonus, no other browser supports this.
So this leaves me in a quandry. Although i *could* build the page with the proper smarts to only display one selection based on the identifying browser ID, and may still) that's CPU wasteful on some machines i want to keep the CPU count low on.

Well, another IE bug comes to the rescue. Turns out that if you call
window.attachEvent(onLoad,pageInit); on a page that already has an onLoad assigned to it, IE ignores the request, and also doesn't bitch about it. It just ignores it completely.

So, now the new block of code reads:
<!-- set up the IE specific call (ignored by civilized browsers) -->
<script language="javascript" for="window" event="onLoad()">
pageInit();
</script>
<!-- Make sure that our code gets called (ignored by IE) -->
<script language="javascript">
window.attachEvent(onload,pageInit);
</script>

And once again, peace rules in the valley. You know, i can hardly wait until i don't have to deal with crap like that again.

Ok, that's what i get for posting something at three in the morning. Doing some additional testing, firefox also respects the "for=… on=…" so just the one function would work fine for both.

Oh look, more forehead shaped desk dents.

  1. 2004-07-28 04:35:45
    Based on what I've seen lately, IE use is actually way down. Some people actually listened to the warnings and quit using it. Admittedly, my site is slanted towards Mac and non-IE users, but I'm only seeing about 1/3 of my users on IE instead of over half a couple months ago. That's encouraging.
  2. 2004-07-28 06:17:51
    So let me get this straight: you're opening a hamburger stand, right?
  3. 2004-07-28 10:49:17
    If a page breaks, just do this: < /BR > PROGRAMMING HUMOR.
  4. 2004-07-28 10:50:08
    The programming stuff was deleted. Computers just don't get my sense of humor!
  5. 2004-07-28 17:54:46
    I''m just in awe that others understand what you just said...
  6. steveo
    2004-07-29 15:29:42
    The only, and let me stress this again, the only reason I still use IE is because Yahoo has be by a ring through my nose with my Y!Companion. Literally, my entire online existence is run through that thing, and I can only get it in IE flavor. Damn you Yahoo.
  7. 2004-07-29 16:26:13
    I think they're working on that, particularly the synchronized bookmarks thing once I someone gets their act together and finishes the damn code.
Wanna join in?

Blogs of note
personal that's my blog
(The Official Blog of the Internet)
memoirs of hydrogen guy matthew shepherd (quebec) rhapsodic.org Henriette's Herbal Blog lynne ydw i slumbering lungfish
geek Y!Cool Thing jeremy z
(The Official Website of the Internet)
dave's picks ultramookie Josh Woodward derek balling simon willison
news ars technica search engine watch

Powered by WordPress
Hosted on Dreamhost.