INLS 181 Internet Applications - PowerPoint PPT Presentation

1 / 14
About This Presentation
Title:

INLS 181 Internet Applications

Description:

Store data in a permanent form. Source: SmartPlanet.com ... An object is something (Web page) Objects perform methods (show an image) ... JavaScript Countdown ... – PowerPoint PPT presentation

Number of Views:52
Avg rating:3.0/5.0
Slides: 15
Provided by: williamsc3
Category:

less

Transcript and Presenter's Notes

Title: INLS 181 Internet Applications


1
INLS 181Internet Applications
  • JavaScript

2
Defined
  • Scripting language
  • Gives developer control over pages
  • Change content
  • Alert and Redirect user
  • Loops
  • Case sensitive

3
JavaScript is not Java
  • JavaScript
  • Simple text
  • Part of the document
  • Simple applications
  • Adds interactivity
  • Java
  • Applet running a virtual machine
  • Opens a separate window
  • Complex applications

4
Alternatives to JavaScript
  • VBScript
  • Easy to learn if you know JavaScript
  • Integrated with ActiveX
  • Only supported by Microsoft IE
  • CGI
  • Executes on the server
  • Store data in a permanent form

5
Document Object Model
  • An object is something (Web page)
  • Objects perform methods (show an image)
  • Methods have properties which can be modified
  • Image
  • File
  • Height/Width
  • Manipulate properties with JavaScript

6
Incorporating JavaScript
  • Use the ltSCRIPTgt tag
  • Insert into your Web page
  • Within ltHEADgt tags
  • Within ltBODYgt tags
  • Ignore JavaScript
  • lt! --
  • // -- gt

7
JavaScript from Scratch
  • We will instruct JavaScript to write out to a Web
    page the date and time we last modified the file.
  • ltscript language"JavaScript"gt
  • document.write(document.lastModified)
  • lt/scriptgt

8
JavaScript Countdown
  • We will add the time in minutes and seconds until
    we have our Web site up and running.
  • We will create variable and make a calculation.

9
JavaScript Functions
  • Groups of statements treated as a single unit.
  • function Greet(who)
  • alert (Greeting.) who
  • Parenthesis indicate parameter
  • Braces indicate beginning and end of function
  • Functions are called Greet(who)

10
JavaScript Scrolling Text
  • Now, we will add a scrolling message to the
    status bar at the bottom of our Web page.
  • function ScrollMessage()

11
JavaScript Hiding Scripts
  • Hiding a Script from Older Browsers
  • lt!--
  • // --gt
  • Inserting Comments
  • // your comment here
  • / This is a long comment /

12
JavaScript Rollovers
  • We can replace one image with another - rollover
  • ltA HREF"index.html" onMouseOver"SwapOut()"
    onMouseOut"SwapBack()"gt

13
JavaScript Incorporating User Data
  • You can use JavaScript to gather information from
    users and create an HTML document with that
    information.
  • Use prompt to bring up a dialogue box

14
JavaScript Forms
  • Forms are among the most useful feature of the
    HTML language
  • This form collects, checks, and email information
    back to the forms creator.
Write a Comment
User Comments (0)
About PowerShow.com