Wednesday, August 11, 2010

Javascript

Share I remember the first time I played with Javascript. I was trying to use a rollover effect, and by the time I was done fighting with the code, I was almost happy! Then someone was kind enough to point out to me that you could accomplish the same effect with CSS. That was after about 30 hours of me fighting with my computer... Gah!

Even now I tend to avoid using Javascript. There are a lot of browsers that don't support it, and many people have it disabled for security reasons. I don't necessarily agree with the "security reasons," however, that's a different topic. The majority of the time, you can accomplish the same things with CSS, PHP and flash that you would with Javascript. My home page on my course website is an example of me skirting Javascript. All of the content is actually on the index.html file, and I'm ussing CSS to hide it until it is called for. Typically people use Javascript for this. The only disadvantage is that the site doesn't know which link is active, so if I wanted to use a different style link for the active page, I would not be able to. That's a very small price to pay in my opinion. :)

No comments:

Post a Comment