Anyone know of a way to control when certain page elements load? I really like having that little mood thingy in my sidebar, but it’s controlled by an external Javascript file, and lately I’ve noticed it’s been loading quite slowly, and thus slows down the rest of my sidebar from loading. Any ideas? I hate am impatient with Javascript, but I like my mood thingy, dammit. Maybe I could put it in an iframe — even though I’m kind of morally opposed to iframes.
I’ve been writing Javascript all day at work today. It is so not fun. I heart server-side scripting.
Speaking of which: maybe over Thanksgiving break I’ll figure out how to fix those weird ASB bugs that have crept up. We’ll see. I would really like to get all that taken care of, do another release, and take a break from working on it for a while.
It’s a dismal, foggy, rainy day, and I feel kind of depressed. Also I appear to be developing a “Chick-fil-a belly.”
9 Responses to "Javascript"
You could code your own mood thingy. :)
If you put the mood thingy in an iframe maybe it won’t hold up the rest of your page. You could try the DEFER attribute on your SCRIPT element, but that probably won’t work since the script is writing to the page. Without changing the script on their end I don’t see another way. Of course if you redesigned using CSS layout instead of tables it might help as well.
And hey, don’t badmouth JavaScript, it has some nice object-oriented goodness for those that take advantage of it (but alas, most do not).
Sorry, I’m feeling curmudgeonly today (I need a mood thingy…)
Yes, I *could* code my own mood thingy, but I can’t do all those cool little drawings! I’m no artist!
As for badmouthing Javascript, here’s the thing… it can be really cool, when it works. But it always takes me twice as long to do something with Javascript as it would with PHP, for example.
There. I edited my entry so it doesn’t say “hate” anymore. Hate is a strong word, after all.
Yeah I was kinda implying that you “borrow” the images and make your own back end. They might appreciate the lift off of their server, as long as you link back to them. A little more work for you, but less reliance on outside networks.
Amber - on a different note - I’m a bit saddened that my own political blog didn’t warrant a link under your ‘political’ bar.
Just saying. :)
Doh! Sorry for that oversight, Jmac. It has been remedied. (Now you just need to update your political blog! It’s been almost a month, geez!)
Fair enough. I’ve got some things coming soon … I promise!
I added the
deferattribute to thescriptelement — we’ll see if that makes a difference. Not sure how many/which browsers actually supportdefer— although in theory, they all should, since it’s part of the HTML 4.01 and XHTML 1.0 spec.CSS-based layout coming soon! I know I should practice what I preach. :P But this blog’s layout has remained pretty much unchanged since I started it in April 2002. Back then, I didn’t know much about CSS (I was creating classes and assigning them to the
fonttag, for Chrisakes.)