Thursday, October 26, 2006

JavaScript and the Curse of the Pop-Up

JavaScript is NOT the same as Java - they are distant cousins but Java is a programming language whereas JavaScript is primarily a scripting language for use within HTML pages to add functionality. Because Javascript is embedded into HTML in order to be read by a web browser, it means it can be copied easily. Although annoyingly there are variations of JavaScript and different browsers don't always support the same JavaScript. It is supported by recent browsers from Netscape and Microsoft, although Internet Explorer supports only a subset, which Microsoft calls Jscript.

So what exactly does Javascript do? Well, JavaScript can spice up websites with dynamic content, open pop-up windows (which are really annoying), create mouseover menus (equally irritating), and change images as the mouse cursor moves over them.

So is it really that great? In my opinion, not really. Although it might be able to do a few snazzy things, there are browser incompatibility issues and SEO isses - most search engines are unable to index these scripts properly. So what's the alternative? Well, you can achieve added functionality such as the mouse 'rollover' effect by using standard compliant CSS. And where JavaScript really is essential, make sure you follow the W3C DOM Level 1 or 2 standards and most browsers should execute it correctly.

No comments: