How To Program In Javascript With Deitel And Deitle



Similar documents
Course Information Course Number: IWT 1229 Course Name: Web Development and Design Foundation

Introduction to ASP. Are you sick of static HTML pages? Do you want to create dynamic web pages? Do you

This course provides students with the knowledge and skills to develop ASP.NET MVC 4 web applications.

Basic Website Creation. General Information about Websites

Installing and using XAMPP with NetBeans PHP

Chapter 13 Computer Programs and Programming Languages. Discovering Computers Your Interactive Guide to the Digital World

CSE 203 Web Programming 1. Prepared by: Asst. Prof. Dr. Maryam Eskandari

WEB PAGE DESIGN AND DEVELOPMENT 2 COURSE CODE: 5033 (COURSE NAME CHANGES TO ADVANCED WEB DESIGN AND DEVELOPMENT IN )

Hypercosm. Studio.

ASP.NET: THE NEW PARADIGM FOR WEB APPLICATION DEVELOPMENT

IE Class Web Design Curriculum

4.2 Understand Microsoft ASP.NET Web Application Development

Webmail Using the Hush Encryption Engine

Web Application Development

4 Understanding. Web Applications IN THIS CHAPTER. 4.1 Understand Web page development. 4.2 Understand Microsoft ASP.NET Web application development

2667A - Introduction to Programming

ACE: Dreamweaver CC Exam Guide

Short notes on webpage programming languages

Database Forms and Reports Tutorial

Lesson Review Answers

Basics. a. Click the arrow to the right of the Options button, and then click Bcc.

WEB PAGE, DIGITAL/MULTIMEDIA AND INFORMATION RESOURCES DESIGN

Using Application Insights to Monitor your Applications

Further web design: HTML forms

DEPLOYING A VISUAL BASIC.NET APPLICATION

Visual COBOL ASP.NET Shopping Cart Demonstration

INTERNET PROGRAMMING AND DEVELOPMENT AEC LEA.BN Course Descriptions & Outcome Competency

Programming Fundamentals of Web Applications Course 10958A; 5 Days

Introduction to Measurement Tools

WIRIS quizzes web services Getting started with PHP and Java

AJAX Toolkit Framework

Lesson Overview. Getting Started. The Internet WWW

Chapter 1. Introduction to web development

IBM Script Portlet for WebSphere Portal Release 1.1

Module 6 Web Page Concept and Design: Getting a Web Page Up and Running

Yandex.Widgets Quick start

Hands-On Lab. Building a Data-Driven Master/Detail Business Form using Visual Studio Lab version: Last updated: 12/10/2010.

Developing ASP.NET MVC 4 Web Applications Course 20486A; 5 Days, Instructor-led

Credits: Some of the slides are based on material adapted from

STATEMENT OF PURPOSE

Web Forms for Marketers 2.3 for Sitecore CMS 6.5 and

ASP.NET Using C# (VS2012)

Richmond SupportDesk Web Reports Module For Richmond SupportDesk v6.72. User Guide

Building A Very Simple Web Site

10CS73:Web Programming

This tutorial assumes that you are familiar with ASP.Net and ActiveX controls.

Free Google Tools for Creating Interactive Mapping Mashups

DEVELOPMENT OF A WEB GEOSERVICES PLATFORM FOR SCHOOL OF ENVIRONMENTAL SCIENCES, MAHATMA GANDHI UNIVERSITY, KERALA, INDIA

Internet Technologies_1. Doc. Ing. František Huňka, CSc.

How to start with 3DHOP

Term Paper. P r o f. D r. E d u a r d H e i n d l. H o c h s c h u l e F u r t w a n g e n U n i v e r s i t y. P r e s e n t e d T o :

SQL Server 2005 Reporting Services (SSRS)

Introduction to web development and JavaScript

COURSE SYLLABUS EDG 6931: Designing Integrated Media Environments 2 Educational Technology Program University of Florida

Providing the Public with Data Visualization using Google Maps

Learnem.com. Web Development Course Series. Quickly Learn. Web Design Using HTML. By: Siamak Sarmady

How To Understand Programming Languages And Programming Languages

Composite.Community.Newsletter - User Guide

Viewing Form Results

Hands-On Lab. Web Development in Visual Studio Lab version: Last updated: 12/10/2010. Page 1

HTML5. Turn this page to see Quick Guide of CTTC

MS WORD 2007 (PC) Macros and Track Changes Please note the latest Macintosh version of MS Word does not have Macros.

Joomla! Actions Suite

Mindshare Studios Introductory Guide to Content Management Systems

Microsoft Visual Studio 2010 Instructions For C Programs

Web Development. Owen Sacco. ICS2205/ICS2230 Web Intelligence

CREATING WEB PAGES USING HTML INTRODUCTION

601/8498/X IAO Level 3 Certificate in Web Design and Development (RQF)

GLEN RIDGE PUBLIC SCHOOLS MATHEMATICS MISSION STATEMENT AND GOALS

Ajax Development with ASP.NET 2.0

Appendix N INFORMATION TECHNOLOGY (IT) YOUTH APPRENTICESHIP WEB & DIGITAL COMMUNICATIONS PATHWAY WEB & DIGITAL MEDIA UNIT UNIT 6

Diploma of Website Development

Website Builder Documentation

HTML Form Widgets. Review: HTML Forms. Review: CGI Programs

Introduction to web development

VB.NET - WEB PROGRAMMING

3DHOP Local Setup. Lezione 14 Maggio 2015

CROWNPEAK C# API SYSTEM CONFIGURATION GUIDE VERSION 3.0.1

Terms and Definitions for CMS Administrators, Architects, and Developers

Notes on how to migrate wikis from SharePoint 2007 to SharePoint 2010

CB Advanced: Innovative Document Templates

Building an ASP.NET MVC Application Using Azure DocumentDB

The goal with this tutorial is to show how to implement and use the Selenium testing framework.

Setting up and Automating a MS Dynamics AX Job in JAMS

Elgg 1.8 Social Networking

Enduring Understandings: Web Page Design is a skill that grows and develops throughout the careful planning and study of software and design.

Multi-Router Traffic Grapher (MRTG)

A SharePoint Developer Introduction

Installing C++ compiler for CSc212 Data Structures

Application Development With Data Studio

MadCap Software. Import Guide. Flare 11

App Development for Modern UI MODULE 4: APP DEVELOPMENT ESSENTIALS

IP addresses. IP addresses: IPv4: 32 bits:

LAB MANUAL CS (22): Web Technology

Fractions to decimals

Transcription:

Internet & World Wide Web: How to Program by Deitel and Deitel Javascript Hands-On Lesson 01

Use a Text Editor The file you create must be plain text Not a Word document Not Rich Text Format (.rtf) Just text We will give an extension of.html Notepad bare bones Visual Studio s text editor much better Many other tools some are WYSIWYG

Getting Started t with Visual Studio Open Visual Studio File Open Web Site Open MyWebSite that contains all your other in-class pages OR File New Web Site (to start from scratch) Choose the Empty Web Site Template

Getting Started t with Visual Studio In Solution Explorer, right-click on the name of the solution and add an images folder if there is not one already In Solution Explorer, right-click on the name of the solution Select Add New Item Select the HTML Page template Click Add Name the page whatever you want

Problem 6.19 From Deitel Text Pages 231-232 6.19 Write a script that gets from the user the radius of a circle and outputs XHTML text that displays the circle's diameter, circumference and area.

Flowchart of Solution Algorithm Create a flowchart of the solution process

Pseudo Code of Solution Process Write pseudo code or detailed instructions for the solution process 1. Declare the variables you will need a variable to hold the value of the radius that the user inputs. The user will input a value, but the input will be treated as a string a variable to hold the numerical value of the radius that will be used in the calculation a variable to hold the value of the diameter that you calculate based on the user's input value of radius a variable to hold the value of the circumference that you calculate based on the user's input value of radius a variable to hold the value of the area that you calculate based on the user's input value of radius 2. Create a prompt window that asks the user to enter a value for the radius of a circle. The statement should save the value in the variable you set up for the string input value of the radius 3. Convert the input string value of the radius to the type float (a javascript function you can use for that purpose p is parsefloat) 4. Compute the circumference 5. Use the Math.round function to round the circumference value computed to tenths or hundreths 6. Write a javascript statement to compute the area 7. Use the Math.round function to round the area value computed to tenths or hundreths 8. Write 3 javascript statements to output the results

Set up the Page Structure for the Script Add a <script></script> element to the <head></head> element of the page that will call the script

1 Declare the Variables You need: a variable to hold the value of the radius that the user inputs. The user will input a value, but the input will be treated as a string a variable to hold the numerical value of the radius that will be used in the calculation a variable to hold the value of the diameter that you calculate based on the user's input value of radius a variable to hold the value of the circumference that you calculate based on the user's input value of radius a variable to hold the value of the area that you calculate based on the user's input value of radius

2 Get Input from User Create a prompt window that asks the user to enter a value for the radius of a circle. The statement should save the value in the variable you set up for the string input value of the radius. Convert the input string value of the radius to the type float (a javascript function you can use for that purpose is parsefloat)

3 Process or Calculate Compute the circumference Use the Math.round function to round the circumference value computed to tenths or hundreths Write a javascript statement to compute the area Use the Math.round function to round the area value computed to tenths or hundreths

4 Show Output Write 3 javascript statements to output the results

Save Build Start w/o Debugging g to Test The browser renders the content with the structure specified by the XHTML markup and the embedded Javascript code

Results!

Other Ways Many similar resources available Use Page View Source option in IE to examine the JavaScript used Some sites use php a server side scripting language or some other server-side language Can you tell which sites use JavaScript and which use a serverside program? Which of these calculators do you like best? Why? Can you find one you like better? http://math.about.com/libra ry/blcirclecalculator.htm http://www.csgnetwork.co m/circle_sphere_area_calc ulator.html http://easycalculation.com/ area/circle.php p http://www.basicmathematics.com/circumfe rence-calculator.html

Internet & World Wide Web: How to Program by Deitel and Deitel Javascript Hands-On Lesson 01