Note 2 for Web Scripting

Watch & Read:

Javascript is an event driven Language! (Something must happen to trigger Javascript into action)

A very cool way to use Java Script!

Code
Outputs
\' single quote
\" double quote
\& ampersand
\\ backslash
\n new line
\r carriage return
\t tab
\b backspace
\f form feed

Comment Tags

<!-- HTML comment tag -->

// Javascript comment tag -single line

/* start and */ end a multi-line comment block

 

Alert box

alert("I am an alert box!!");

Confirm box

var combox=confirm("Please Press a Button");

Prompt box

var name=prompt("Name Please","default info");

 

We will be using the Document Object Model (DOM) to break the browser into Objects (parts) that you can manipulate.

You will be manipulating the Objects

Example of an Object and the Dot Notation

Object: Steve Nash (Steve_Nash)

Properties: (Characteristics)

The Sport he plays is Basketball:Steve_Nash.Sport = Basketball

The Team he plays for is the Suns: Steve_Nash.Team = Suns

Steve Nash's height is 6'3'': Steve_Nash.height = 6 feet 3inces

Method: (actions or complex interaction)

Steve Nash dribbiling the Basketball: Steve_Nash.dribbiling()

Steve Nash shooting a free throw: Steve_Nash.freethrow()

Steve Nash passing to a team mate:Steve_Nash.passing()

 

We will start with the Browser Objects Reference:

We will be traveling the DOM Tree!

getElementsByName(), getElementById() and getElementsByTagName() methods

 

Objects
Anchor FileUpload Meta Table
Applet Form Navigator TableData
Area Frame Option TableHeader
Base Frameset Password TableRow
Basefont Hidden Radio Text
Body History Reset Textarea
Button Iframe Screen Window
Checkbox Image Select  
Document Link Style  
Event Location Submit  

 

 

Our Webspace is at http:// e-commerce.pvc.maricopa.edu

A video showing how to use CoreFTP to access our Webspace is located http://e-commerce.pvc.maricopa.edu/video/
CoreFTP.avi

File Names should be:

lower case; Example: jon.html not Jon.htmlFTP login

Avoid space in the name; Example: next-time.html instead of next time.html

Simple name while explaining the content; Example: about.html instead of aboutus.html

FTP: Your Host is: e-commerce.pvc.maricopa.edu
(note: no http or directories after edu)

Use your Blackboard UserID & Password.

Try downloading the FTP Program (if you don't have Dreamweaver)


Terms you need to Lookup:

FTP, Object, Event, Property and Method

Review the following:

HTML DOM

Javascript Dot Notation

Homework:

Reminder: Post on the Discussion Board Section at least one URL of a Web Page that uses a Web script and describe how the script works.

You should Review W3schools HTML Dom

Final Step:

Imagine that your mind is a DVD recorder / player and you can review this content anytime you want.  I want you to close your eyes and quickly review in your mind everything we covered in class. 

I also want you to review everything we covered before you go to bed because I want your mind to process this information while you sleep.  You don’t need to spend much time on this review, 5 minutes will be enough!