Learning Resources Home Downloads News Links Misc Contact Forum
Web Development

Aim:
To teach Web Development with an emphasis on DESIGN and HTML and its APPLICATION within professional environments and outputs.

Week: Five

Working with JavaScripts

JavaScripts can be used to ehance your website. However, choose carefully because many of them look cheap, nasty and actually compromise the usabilty of yoru site.

It's also a fun and visual introduction to understanding various codes and how they work together.

Don't worry, your not always required to write your own! There are many websites that provide free JavaScripts (no need to re-invent the wheel) which you can customise to suit your needs.

One great site is http://www.dynamicdrive.com/

Activity One: Gallery

Log into http://www.dynamicdrive.com/ and find a gallery script in the "image effects" category. I am going to use one called "Lightbox image viewer 2.03a"

Here is the link: http://www.dynamicdrive.com/dynamicindex4/lightbox2/index.htm

Directions:

Simply download Lightbox V2.03a, and refer to the index file inside for installation instructions.

Try to figure it out. If you get stuck here is what you should have. Click here

Here is the same galery just a litle more developed... Intergrated into a structure, CSS applied to the links and photos put into a group (next button). Click here

Activity Two: Scrolling text area

Version One
Here is the standard text area that can be created in Dreamweaver by simply going to the "Windows" menu > opeing the "insert" bar and selecting from the "forms" tab. Its properties can be adjusted in the properties bar. Click here

Version Two
Here is another one from Dynamic Drive. Log into http://www.dynamicdrive.com/ and look in the "dynamic content " category. I am going to use one called "Scrollable content"

Here is the link: http://www.dynamicdrive.com/dynamicindex11/scrollc.htm

Directions:
Simply add the following to the BODY section of your page



Configuring the script:
The width of the "window" is represented by the value 170, and the height, 150. To alter the dimensions, change ALL instances of 170 to another value, and the same for 150 (just do a search-and-replace). You can also give the window a different background color. Just change "yellow" to another color name.

Click here for basic view
Click here for a more developed view (Images, Links and CSS)

JavaScripts can often get pretty messy...

Version two is far more editable than version one but far more difficult to work with (you will see). I am not a big fan of scrollers, I prefer to devide the information into new (bit-size) pages rather than using scrollers to deliver large chuks of information to the user. Feel free to look for easier to use scrollers... I saw a few CSS ones which were pretty nice but I chose this for a reason ;)

Enjoy and have fun :)