Silverfen Web Design

Javascript

Javascript has, perhaps a little harshly, been called the “Gaffa tape of the world wide web”. It’s the scripting language used on web pages. Despite that rather pejorative description, there are few web sites that don’t use it at some level.

Some will argue that effective use of style sheets renders Javascript unnecessary. Style sheets do indeed provide some powerful and flexible ways of controlling the appearance of web sites. The snag is that browsers don’t always implement the standards for style sheets as well as they might, and there are particular problems when people use out-of-date browsers.

On this site, Javascript has been used to:

  • cycle through the screen shots on the home page (once that page has loaded);
  • make the white area of the window move down if there were likely to be significantly more grey below than above;
  • make this block of text scroll if necessary;
  • adjust the width of the white box as it was too wide in Internet Explorer (which has a reputation for not following web standards as well as Firefox)
  • hide the contact email address from programs that trawl the internet looking for email addresses to send spam to
  • to make the links on the left go red when the relevant article is read.

That’s typical of the use of Javascript on a relatively simple site. Other common uses would be to enable things to move (or change) on a web page, to check the contents of a form or to let the answers to one question inform others that are asked.

More complicated sites make heavy use of Javascript — extending what can be done in html and style sheets, and enhancing the computing of a web site.