Entry

Aug15

Simple classes

I’ve recently have been getting interesting in javascripting. It’s weird because I always thought that javascript was bad because not everyone has it enabled in their browsers. Or something to that line.

But javascript can do lots of cool little things in a browser. I still don’t know enough to make some complicated ajax application but I can do cool little things - like the staple image rotator. If you check out the Alienware QuakeCon 05 page, you’ll see at the top of the page the Alienware Image rotator. Ok, so the layout seems to be having some issues in Firefox in Windows XP - I don’t get the scroll bar at work and I keep forgetting to fix it. But, the image rotator seems to be working. So I suppose it’s not really a rotator - thats only because I didn’t start it. I set up a class using prototype in javascript and made it general enough to be able to use it in just about any image hovering changing capacities. I’m even thinking that I might need to add a pop-up function to it. Currently the QuakeCon 05 page uses a function made for that page to pop up the bigger images.

The script still has some work left. I’ve done some minor checking for DOMs. The script currently has two ways of switchin images, the DOM 1 way of doing things and the ie non-DOM way of doing thins. The difference? If I can remove and add element nodes I use DOM calls to remove and add elements to a holding element. Otherwise I just resorted to using .innerHTML. So outside of ie and mozilla, I’m not sure how well it works. I’ve also set up the script to preload all images - the thing is that it won’t change images until all images are loaded. That’s by design though. Is this a good or bad thing to do? The status display doesn’t work that well, and it’s not on the page becuase my boss doesn’t like it too much - we only see the “Images Loaded” status.

Anyways, if you are planning on checking out the code, it’s not technically mine even though I made it. It’s the copyright of Alienware.

August 15, 2005 09:39 PM Development

Comments

Leave a comment of your own

If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.

Use of HTML for comments is not available.

In an effort to combat spam, you will be able to post your comment after you preview.





Powered by Movable Type 3.2 Creative Commons License: Some Rights Reserved © 2000-2005

Site feeds. Hofully valid XHTML and CSS. No kitties were harmed in the making of this website.