Creating Web Documents catch-up JavaScript slide show tools redirection.

Slides:



Advertisements
Similar presentations
1 What is JavaScript? JavaScript was designed to add interactivity to HTML pages JavaScript is a scripting language A scripting language is a lightweight.
Advertisements

MWD1001 Website Production Using JavaScript with Forms.
Introducing JavaScript
JavaScript FaaDoOEngineers.com FaaDoOEngineers.com.
UNIT 12 LO4 BE ABLE TO CREATE WEBSITES Cambridge Technicals.
Programming games Classwork: Show Favorite Sites. Show coin toss. Review concepts. Crooked coin toss. Homework: Complete coin toss examples. Upload files.
Programming with Alice Computing Institute for K-12 Teachers Summer 2011 Workshop.
29 November JavaScript: Arrays and Iterations Functions.
Computer Science 103 Chapter 4 Advanced JavaScript.
Macromedia Dreamweaver 4 Advanced Level Course. Add Rollovers Rollovers or mouseovers are possibly the most popular effects used in designing Web pages.
XP Tutorial 1 New Perspectives on JavaScript, Comprehensive1 Introducing JavaScript Hiding Addresses from Spammers.
Web Development & Design Foundations with XHTML Chapter 14 Key Concepts.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 14 Key Concepts 1 Copyright © Terry Felke-Morris.
Programming Games Computer science big ideas. Computer Science jargon. Show virtual dog Homework: [Catch up: dice game, credit card or other form.] Plan.
Javascript and the Web Whys and Hows of Javascript.
JavaScript Form Validation
CNIT 133 Interactive Web Pags – JavaScript and AJAX Event and Event Handling.
JavaScript, Fifth Edition Chapter 1 Introduction to JavaScript.
© Cheltenham Computer Training 2001 Macromedia Dreamweaver 4 - Slide No 1 Macromedia Dreamweaver 4 Advanced Level Course.
Pre-Coding Web Design – Sec 3-1 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development I” Course materials.
Creating Web Documents: JavaScript, continued Tool reports Creating new windows Form input verification Homework: read about JavaScript, start planning.
JavaScript Part 1.
JavaScript Lecture 6 Rachel A Ober
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 14 Key Concepts 1 Copyright © Terry Felke-Morris.
CSS Class 7 Add JavaScript to your page Add event handlers Validate a form Open a new window Hide and show elements Swap images Debug JavaScript.
CC1003N Week 6 More CSS and Javascript.. Objectives: ● More CSS Examples ● Javascript – introduction ● Uses of Javascript ● Variables ● Comments ● Control.
Creating Web Documents Questions on JavaScript (lecture, text)? Work on JavaScript examples and/or Project III Calculations Homework: experiment, research.
Chapter 4: Decision Making with Control Structures and Statements JavaScript - Introductory.
Client Side Programming with JavaScript Why use client side programming? Web sides built on CGI programs can rapidly become overly complicated to maintain,
INTRODUCTION TO JAVASCRIPT AND DOM Internet Engineering Spring 2012.
1 JavaScript in Context. Server-Side Programming.
TUTORIAL 10: PROGRAMMING WITH JAVASCRIPT Session 2: What is JavaScript?
Done by: Hanadi Muhsen1 Tutorial 1.  Learn the history of JavaScript  Create a script element  Write text to a Web page with JavaScript  Understand.
Tutorial 8 Programming with ActionScript 3.0. XP Objectives Review the basics of ActionScript programming Compare ActionScript 2.0 and ActionScript 3.0.
Extending HTML CPSC 120 Principles of Computer Science April 9, 2012.
CO1552 Web Application Development HTML Forms, Events and an introduction to JavaScript.
Client-Side Scripting JavaScript.  produced by Netscape for use within HTML Web pages.  built into all the major modern browsers. properties  lightweight,
JavaScript, jQuery, and Mashups Incorporating JavaScript, jQuery, and other Mashups into existing pages.
Programming games Show shaking screen, quiz show. Calculations Homework: (Finish basic Javascript Projects) Make proposal. Work on project.
JavaScript - Basic Concepts Prepared and Presented by Hienvinh Nguyen, Afshin Tiraie.
Programming games HTML/JavaScript basics Functions, events, forms Classwork: [Show favorite sites.] Coin toss. Homework: GET WEB SPACE. Complete coin toss.
XP Tutorial 8 Adding Interactivity with ActionScript.
JavaScript, Fourth Edition
4 HTML Basics Section 4.1 Format HTML tags Identify HTML guidelines Section 4.2 Organize Web site files and folder Use a text editor Use HTML tags and.
Web111a_chapt08.ppt HTML: Section 8 JavaScript CGI Programs (Server Side programs) Common Gateway Interface Run on server Communicate with user across.
Programming Games Logic. Slide show. Range input. Storage. Datatypes. Binary numbers. Homework: Catch up. This includes uploading projects to your server.
Creating Web Documents: JavaScript Ftp / file management: review Introduction to JavaScript Sources Homework: start review for midterm, work on Project.
JavaScript. JavaScript Introduction JavaScript is the world's most popular programming language. It is the language for HTML and the web, for servers,
Tutorial 11 1 JavaScript Operators and Expressions.
Introduction to JavaScript MIS 3502, Spring 2016 Jeremy Shafer Department of MIS Fox School of Business Temple University 2/2/2016.
Javascript Basic Concepts Presentation By: Er. Sunny Chanday Lecturer CSE/IT RBIENT.
Programming Games Reprise Credit Cards! Reprise Binary. Overall time limit, setTimeout Homework: [Show virtual something.] Make proposal as reply to my.
 2001 Prentice Hall, Inc. All rights reserved. Outline 1 JavaScript.
Client-side (JavaScript) Validation. Associating a function with a click event – Part 1 Use the input tag’s onclick attribute to associate a function.
Programming games Show work on site. Work on slide show. Timed event for bouncing ball. Homework: [Finish slide show and upload to site.] Acquire a short.
Programming Games Work / finish and show dice game. Extras. Timed events. ftp. index file. Homework: Catch up and do slide show.
Web Development & Design Foundations with HTML5
JavaScript is a programming language designed for Web pages.
Project 9 Creating Pop-up Windows, Adding Scrolling Messages, and Validating Forms.
Web Development & Design Foundations with HTML5 7th Edition
Functions, Regular expressions and Events
Web Design and Development
Tutorial 10: Programming with javascript
JavaScript Basics What is JavaScript?
JavaScript is a scripting language designed for Web pages by Netscape.
Web Programming and Design
Web Programming and Design
Presentation transcript:

Creating Web Documents catch-up JavaScript slide show tools redirection

Catch-up good and bad uses of multimedia posting –better late than never –Two viewpoints: evaluate in terms of what is required AND if you had all the plugins, large screen, fast connection, how would it be tool use your 2 projects linked from class site

JavaScript concepts: functions Also known as user defined function as opposed to something built into JavaScript Typically defined in the head section function functionname (parameter list) { …. } called functionname(parameters) as href or event (such as onMouseOver="…")

JavaScript concept: variables variables hold values—names associated with values. The values can change. Recall var rawDate = Date(); var mon = rawDate.substr(4,3); variables can hold strings of characters and numbers var qty = 5; var cost = 10.50; You can set a variable with an expression var total = qty * cost;

JavaScript concepts: expression Arithmetic: total = total * 1.08; This sets the value of the variable total to the result of multiplying the original value total times 1.08 shorthand: –count++ means to add one to count (make the new value of count, the old value plus 1). You can also use ++count. The first returns the original value, the second returns the incremented value. Combine strings: wholename = "Prof. " + fname + " " + lname; If fname="Peter" and lname="Ohring", this would produce "Prof. Peter Ohring". Note that my expression made sure there was a space between the first and last name.

JavaScript concepts: IF IF statement is used to check a condition and possibly execute [section of] code. Say you want to calculate a tip and also always leave at least a dollar: tip =.15 * total; if (tip < 1) { tip = 1; } (tip<1) is the condition. The code in the brackets is only done if the condition is true.

JavaScript concepts: arrays Array are variables that are sets of things slides = new Array( 'bird.gif', 'frog.gif', 'heart.gif' ); The individual components of an array are cited using an index slides[0] is 'bird.gif', slides[1] is 'frog.gif', slides[2] is 'heart.gif' The indices start at zero. slides.length gives the number of elements in the array.

JavaScript concept: time interval You can set up an event that will happen every interval tid = setInterval("change()", 800); –Every 800 milliseconds (slightly less than one second=1000 milliseconds), change() will be called. change is a function you will write. The function has no parameters. window.clearInterval(tid); –The time interval numbered tid is stopped.

Slide show example In the head section, define an array with the names of 3 (could be any number) of image files and 3 functions: –change() –startss() –stopss() and two variables –ns, which will hold the number of distinct images –tid, which will hold the timing interval

Slide show <!-- slides = new Array('bird.gif', 'frog.gif', 'heart.gif'); var sn = 0; var ns = slides.length; var tid; function change() { document.pic1.src = slides[sn]; if (ns<=++sn) { sn = 0; } function startss() { tid=setInterval('change()',800); } function stopss() { window.clearInterval(tid); } //-->

Start show Stop Show

Alternatives In place of: Start show you can set the onClick event. Start show You need to include return false, or else the whole page may be refreshed.

Tools Pros and cons? Why we use NotePad in class? –to get you to learn the tags –to make things less complicated –to keep you from doing more complicated things –to prevent problems produced by the tools, such as absolute names for files and extra tags.

What do you do… when you move a site to new location? For example, we decided (at long last) to move the Meyer family origami site to a Purchase server from the Pace server links all worked because they were relative links we changed addresses on the first page used 'redirection' command

Origami Paper This site has been moved to Meyer Family Origami Site at You should be redirected to the new site. If not, click on the link or enter the address into the location field on the browser. Thank you

Homework catch up on postings Define your project III. Read in the textbook on JavaScript and Forms. Project III must have –at least one use of JavaScript –at least one use of Forms –image map AND animation –frames or tables (if you didn't use one before, do it now) –styles – which we will get to later.