Digital Design for the Arts and Humanities website

Digital Design homepageDaily Readings for Digitial Design courseDigital Design Course syllabusE-Mail Digital Design StudentsTechnology, Arts, and Media Program homepageSewall Academic Program homepageCU-Boulder homepage

Really Annoying Javascript Tricks

Assignment: Come to class on Friday, March 10,
with a short description of the larger goal and
focus of your next website.

1.  Understanding HTML Code

<script> ....</script>


<head> .... </head>

<a href= "index.htm">Home Page </a>

2. Using Javascript Behaviors in Dreamweaver:
     Use Free

  1. Java and Javascript are not the same thing.
    Javascript is a scripting language that is used
    to set the properties of a webpage.  Java
    is a compiling programming language that
    is used to develop program applications.

  2. You can use "Behaviors" window in 
    Dreamweaver to insert javascript behaviors
     into your webpage

  3. But in order to use the "Behaviors" window,
     you must first download the behavior from
    the Macromedia Exchange website

3. . Adding Javascript using Macromedia Extension Manager

  1. Go to Dreamweaver Exchange to download javascript behaviors

  2. In order to download extensions, you must have Macromedia Extension Manager on your computer

  3. Use the Behaviors Tools window to add javascript effects to your page.

  4. Use example of "Text Link Rollover"

  5. In Dreamweaver, use "Insert" and select "TextRollover"

  6. Example of Text Link Rollover using Dreamweaver
4. Adding more than one Javascript Effect to a page
  1. So what's the problem: Adding mulitple
    javascript code to one page

  2. Adding more than one javascript trick to a page
One event handler, many javascript actions

SCRIPT 1: <body onload="dothis()">
SCRIPT 2: <body onload="dothat()">
RESOLUTION: <body onload="dothis();dothat()">

SCRIPT 1: <body onload="dothis()">
SCRIPT 2: window.onload=dothat()
RESOLUTION: <body onload="dothis();dothat()">

SCRIPT 1: window.onload=dothis
SCRIPT 2: window.onload=dothat
RESOLUTION: <body onload="dothis();dothat()">
  1. Example of Webpage with running clock

    <body onLoad="show5()">

  2. Example of Clock counting the time until

    <body onLoad="getTime()" >

  3. Example of Two Javascripts on the same webpage

<body onLoad="getTime();show5()">

  1. In order for two javascripts to work on the
    same page if they both use the "onLoad"
    command, you must combine them.  If you
    put in two separate "onLoad" commands,
    one of the javascripts won't work.

    <body onLoad="show5()">
    <body onLoad="getTime()" >

  2. You combine the two onLoad commands by
    inserting the onLoad instructions in one
    command string, and separate each onLoad
    command by a semi-colon. 

  3. Notice that the combined onLoad commands
    are now contained with quotation marks.  If
    you put quotation marks around each of
    the onLoad commands, your javascript
    won't work.

<body onLoad="getTime();show5()">

5. Changing colors and textsize in
     javascript code

  1. Highlight text trick

  2. This is an example of Highlighted text .

<span style="background-color:#0066FF">This is an example of Highlighted text</span> 

  1. Upper Lefthand corner Clock trick

  2. Example of Webpage with running clock

  3. //change font size here to your desire
    myclock="<font color='000000' size='5' face='Arial' ><b><font size='5'>Current Time:</font></br>"+hours+":"+minutes+":"
    +seconds+" "+dn+"</b></font>"

  4. Changing color and font size in the Source Code

  5. Source Code for Changing Color and
    Font Size


5. Really Annoying Javascript Tricks

  1. Annoying Roaming Cursor Trick

    ---Roaming Cursor Trick Webpage

  2. Annoying Eyes Trick

    --Annoying Eyes Trick Webpage
  3. Annoying Blinking Links Trick

    --Annoying Blinking Links Webpage

6. Javasript code for Basic Hit Counter

        <!--#exec cgi="/cgi-bin/counter"-->

<br>Number of Visitors to this site:&nbsp; </font><!--#exec cgi="/cgi-bin/counter"--></b>

Example of Hit counter:

Number of Visitors to this site:  57941


















Good Web Design Sites
Award-winning Web Designs
Great Web Design Books
Sewall Class Web Designs

| Home Page  | Readings | Syllabus | Web Resources | Top of Page |

Number of Visitors to this site: 
57942      by Chris H. Lewis, Ph.D.

© 2000 by Chris H.  Lewis, Ph.D.
Sewall Academic Program; University of Colorado at Boulder
Created 1 June 2000:  Last Modified: 13 March, 2006

Digital Design Course homepage