LESSON
11 – USING WEBPAGE SCRIPTS
HTML LIMITATIONS
HTML only provides limited options when it comes to
displaying your site. This is even more true when you want to create interactive menus and
tools on your site. We therefore have to
turn to other technologies that are also supported by our web browsers.
OTHER TECHNOLOGIES
Flash –
Interactive animation tool with full programming capabilities.
CSS – Cascading
Style Sheets is a language used to specify the style of html documents. This language allows for greater
customization and precision of web content placement.
Scripting – There are
a few types of scripting languages. The
most known and used is JavaScript. These
languages allow for the easy addition of interaction on the webpage. Javascript is used
in mouseovers that we did in previous lessons.
TWO FAMILIES OF SCRIPTING
There are two types of scripting:
·
Client-side
scripting or browser-side scripting; and
·
Server-side
scripting.
Client-side scripting (like JavaScript) is
understood by your browser. So, if you
add that type of script to your webpage, your browser will understand the
commands and respond correctly.l
Server-side scripting is not understood by your
browser. In fact, such scripts are never
even sent to your browser. Such web pages
will only work if they are placed on a
server. Here is
1.
Browser sends request to server for webpage.
2.
Server checks for server side scripts and executes
the scripts.
3.
Server sends the result (a webpage) to the browser. There is not even evidence that a server side
script was there.
4.
Browser displays script to user.
The most popular server-side scripting languages are
ASP and PHP.
|
CLIENT SIDE SCRIPTING |
SERVER SIDE SCRIPTING |
Most used languages |
JavaScript |
PHP, ASP |
Supported by browser? |
Yes.
Nothing is needed to test your code. |
No. Access
to a server is needed to test your code. |
Functionality |
A lot, but not as much as server side languages. |
More than client side
languages. |
Need special webspace? |
No |
Yes. The
server that provides your webspace needs to provide
support for the language that you are using. |
Our focus? |
Yes |
No |
ONLINE RESOURCES
Learning a scripting language is a big job. We could easily spend half of a semester on it. Because of time limitations, we will only
experiment with such scripts by using online resources.
One excellent online resource is http://www.dynamicdrive.com. On this site, you see a demo of what a
specific script does and directions on how to embed that script into your
webpage.
GRADE 12
In grade 12, we will learn both CSS and JavaScript.