Solutions to exercises

Size: px
Start display at page:

Download "Solutions to exercises"

Transcription

1 Solutions to exercises Exercise textbox <title>greetings</title> Name: <input type="text" id="name"/> <input id="button" type="button" value="greet" /> <div id="result"> var button = document.getelementbyid("button"); button.onclick = clickgreet; function clickgreet() { var namefield = document.getelementbyid("name"); var name = namefield.value; var resultfield = document.getelementbyid("result"); var date = new Date(); var hour = date.gethours(); if (hour < 13) { resultfield.innerhtml = "Good morning, " + name; else { resultfield.innerhtml = "Good afternoon, " + name; Exdomcalculationwithselect.html "use strict"; function calculate() { var n1 = parseint(document.getelementbyid("n1").value); var n2 = parseint(document.getelementbyid("n2").value); var operator = document.getelementbyid("operator").value; var result = document.getelementbyid("result"); switch(operator) { case "+": result.textcontent = n1 + n2; case "/": result.textcontent = n1 / n2; case "*": result.textcontent = n1 * n2; case "-": result.textcontent = n1 - n2; Solutions JavaScript exercises(part 2) 1

2 <input type="text" id="n1"/> <select id="operator"> <option value="+">+</option> <option value="/">/</option> <option value="*">*</option> <option value="-">-</option> <input type="text" id="n2"/> <input id="btn" type="button" value="=" /> <span id="result"></span> var btn = document.getelementbyid("btn"); btn.onclick = calculate; Exercise Select <title>transfer names</title> <select id="left" size="4" style="float:left;width:70px"> <option value="john">john</option> <option value="paul">paul</option> <option value="ringo">ringo</option> <option value="george">george</option> <div style="float:left"> <input id="toright" type="button" disabled="true" value=">" style="display:block"/> <input id="toleft" type="button" disabled="true" value="<" style="display:block"/> <select id="right" size="4" style="float:left;width:70px"> function moveright() { var option = left.options[left.options.selectedindex]; right.options.add(option); left.options.remove(left.options.selectedindex); leftindexchanged(); rightindexchanged(); function moveleft() { var option = right.options[right.options.selectedindex]; left.options.add(option); right.options.remove(right.options.selectedindex); Solutions JavaScript exercises(part 2) 2

3 rightindexchanged(); leftindexchanged(); function leftindexchanged() { var toright = document.getelementbyid("toright"); if (left.options.selectedindex > -1){ toright.disabled = false; else { toright.disabled = true; function rightindexchanged() { var toleft = document.getelementbyid("toleft"); if (right.options.selectedindex > -1){ toleft.disabled = false; else { toleft.disabled = true; var toright = document.getelementbyid("toright"); var toleft = document.getelementbyid("toleft"); toright.onclick = moveright; toleft.onclick = moveleft; left.onchange = leftindexchanged; right.onchange = rightindexchanged; Solutions JavaScript exercises(part 2) 3

4 Exercise Google <title>search google</title> <style>.hideerror{ display:none;.showerror{ display:block; color:red; </style> <form id="frm" action=" method="get"> <div><label for="q">search:</label> <input type="text" name="q" id="q" required/> <div> <label for="lr">language</label> <select name="lr" id="lr"> <option value="">all</option> <option value="lang_fr">french</option> <option value="lang_nl">dutch</option> <div> <label for="cr">country</label> <select name="cr" id="cr"> <option value="">all</option> <option value="countryfr">france</option> <option value="countrybe">belgium</option> <option value="countrynl">netherlands</option> <div id="error" class="hideerror">you cannot search for french pages in the Netherlands <input type="submit" value="submit"/> </form> "use strict"; var frm = document.getelementbyid("frm"); frm.onsubmit= function() { var selectlanguage = this.elements.nameditem("lr"); var selectcountry = this.elements.nameditem("cr"); var errordiv = document.getelementbyid("error"); console.dir(selectlanguage); console.dir(selectcountry); if (selectlanguage.value === "lang_fr" && selectcountry.value === "countrynl") { errordiv.classname = "showerror"; return false; Solutions JavaScript exercises(part 2) 4

5 return true; ; Solutions JavaScript exercises(part 2) 5

JavaScript CSCI 201 Principles of Software Development

JavaScript CSCI 201 Principles of Software Development JavaScript CSCI 201 Principles of Software Development Jeffrey Miller, Ph.D. jeffrey.miller@usc.edu Outline JavaScript Program USC CSCI 201L JavaScript JavaScript is a front-end interpreted language that

More information

Consider the following file A_Q1.html.

Consider the following file A_Q1.html. Consider the following file A_Q1.html. 1 2 3 Q1A 4 5 6 7 function check () { 8 } 9 10 11

More information

JavaScript 2. Jef De Smedt Beta VZW

JavaScript 2. Jef De Smedt Beta VZW JavaScript 2 Jef De Smedt Beta VZW Overview Introduction Basic elements of JavaScript Arrays Window object Document Object Model Forms Events Objects Recap JavaScript is a scripting language that is browser

More information

5.5 FORM form ex28.html <html> <head>

5.5 FORM form ex28.html <html> <head> 5.5 FORM form ex28.html function calc() { var ar = document.getelementbyid("ar"); if(n1.value == "" n2.value == "") { window.alert(""); else { var eq = n1.value + ar.options[ar.selectedindex].value

More information

JavaScript s role on the Web

JavaScript s role on the Web Chris Panayiotou JavaScript s role on the Web JavaScript Programming Language Developed by Netscape for use in Navigator Web Browsers Purpose make web pages (documents) more dynamic and interactive Change

More information

JavaScript. Jef De Smedt Beta VZW

JavaScript. Jef De Smedt Beta VZW JavaScript Jef De Smedt Beta VZW Getting to know Beta VZW: Association founded in 1993 Computer courses for the unemployed and for employees www.betavzw.org(dutch) Cevora VZW/Cefora ASBL 09:00u-12:30u

More information

Chapter4: HTML Table and Script page, HTML5 new forms. Asst. Prof. Dr. Supakit Nootyaskool Information Technology, KMITL

Chapter4: HTML Table and Script page, HTML5 new forms. Asst. Prof. Dr. Supakit Nootyaskool Information Technology, KMITL Chapter4: HTML Table and Script page, HTML5 new forms Asst. Prof. Dr. Supakit Nootyaskool Information Technology, KMITL Objective To know HTML5 creating a new style form. To understand HTML table benefits

More information

Exam 2 Reference Packet

Exam 2 Reference Packet CS 328 - Exam 2-2015-04-08 p. 1 For Problem 5 Exam 2 Reference Packet Number of cups:

More information

blink.html 1/1 lectures/6/src/ form.html 1/1 lectures/6/src/

blink.html 1/1 lectures/6/src/ form.html 1/1 lectures/6/src/ blink.html 1/1 3: blink.html 5: David J. Malan Computer Science E-75 7: Harvard Extension School 8: 9: --> 11:

More information

To con#nue using your mailbox, you need to upgrade and verify your mailbox. The service is free.

To con#nue using your mailbox, you need to upgrade and verify your mailbox. The service is free. eric.cassette@univ-lille1.fr Account Veriication Final Warnning sur 1 19/04/2018 09:21 Sujet : eric.casse!e@univ-lille1.fr Account Verifica#on Final Warnning De : Email Admin

More information

Creating Forms. Speaker: Ray Ryon

Creating Forms. Speaker: Ray Ryon Creating Forms Speaker: Ray Ryon In this lesson we will discuss how to create a web form. Forms are useful because they allow for input from a user. That input can then be used to respond to the user with

More information

ToDoList. 1.2 * allow custom user list to be passed in * publish changes to a channel ***/

ToDoList. 1.2 * allow custom user list to be passed in * publish changes to a channel ***/ /*** USAGE: ToDoList() Embed a TODO-list into a page. The TODO list allows users to create new items, assign them to other users, and set deadlines. Items that are due are highlighted in yellow, items

More information

HTML DOM IN ANGULARJS

HTML DOM IN ANGULARJS HTML DOM IN ANGULARJS The AngularJS provides directives for binding application data to the HTML DOM element s attribute. These are the HTML DOM attributes used in AngularJS. o Show as ng-show directive.

More information

«FitPhoto» Integration

«FitPhoto» Integration «FitPhoto» Integration Version 4.3 EN Date 21/08/2012 Company FittingBox 2010 FittingBox Reserved 1 / 20 Table of contents 1. Basic Setup... 3 2. Loading FitPhoto... 4 2.1. Synchronous integration (Recommended)...

More information

if(! list.contains(list.collect(params,'key'),'title')){ <div style="font-weight:bold;color:red;">"warning: A title field must be assigned.

if(! list.contains(list.collect(params,'key'),'title')){ <div style=font-weight:bold;color:red;>warning: A title field must be assigned. /** Author: Blake Harms Version 2.9 See: http://developer.mindtouch.com/app_catalog/ Integrated_Bug_and_Issue_Tracker on 2.9 added performance tunning posted by Sego on this blog post: http://forums.developer.mindtouch.com/

More information

Umbraco // The Friendly CMS. ezsearch Documentation

Umbraco // The Friendly CMS. ezsearch Documentation Umbraco // The Friendly CMS ezsearch Documentation Contents 1 Introduction... 3 2 Installation... 4 2.1 System Requirements... 4 2.2 Install ezsearch... 4 2.3 Adding ezsearch to a Template... 4 2.3.1 Via

More information

Interactive Visualization of Clinical Laboratory Parameters with SAS Stored Processes and jquery AJAX

Interactive Visualization of Clinical Laboratory Parameters with SAS Stored Processes and jquery AJAX Paper DV06 Interactive Visualization of Clinical Laboratory Parameters with SAS Stored Processes and jquery AJAX Volker Harm, Bayer AG, Berlin, Germany ABSTRACT Starting with an appropriate clinical laboratory

More information

JAVASCRIPT HTML DOM. The HTML DOM Tree of Objects. JavaScript HTML DOM 1/14

JAVASCRIPT HTML DOM. The HTML DOM Tree of Objects. JavaScript HTML DOM 1/14 JAVASCRIPT HTML DOM The HTML DOM Tree of Objects JavaScript HTML DOM 1/14 ALL ELEMENTS ARE OBJECTS JavaScript can change all the HTML elements in the page JavaScript can change all the HTML attributes

More information

Javascript Lecture 23

Javascript Lecture 23 Javascript Lecture 23 Robb T. Koether Hampden-Sydney College Mar 9, 2012 Robb T. Koether (Hampden-Sydney College) JavascriptLecture 23 Mar 9, 2012 1 / 23 1 Javascript 2 The Document Object Model (DOM)

More information

PIC 40A. Review for the Final. Copyright 2011 Jukka Virtanen UCLA 1 06/05/15

PIC 40A. Review for the Final. Copyright 2011 Jukka Virtanen UCLA 1 06/05/15 PIC 40A Review for the Final 06/05/15 Copyright 2011 Jukka Virtanen UCLA 1 Overview Final is on: Monday, June 08, 2015 11:30 AM - 2:30 PM Geology 4645 Double check on myucla.edu. 06/05/15 Copyright Jukka

More information

By the end of this section of the practical, the students should be able to:

By the end of this section of the practical, the students should be able to: By the end of this section of the practical, the students should be able to: Learn about the Document Object Model and the Document Object Model hierarchy Create and use the properties, methods and event

More information

Learning JavaScript. A C P K Siriwardhana, BSc, MSc

Learning JavaScript. A C P K Siriwardhana, BSc, MSc Learning JavaScript A C P K Siriwardhana, BSc, MSc Condition Statements If statements loop statements switch statement IF THEN ELSE If something is true, take a specified action. If false, take some other

More information

Form Processing in PHP

Form Processing in PHP Form Processing in PHP Forms Forms are special components which allow your site visitors to supply various information on the HTML page. We have previously talked about creating HTML forms. Forms typically

More information

Single Credentialed Portal with Hotspot Button

Single Credentialed Portal with Hotspot Button Device/user flow Embedded hotspot button on Credentialed portal 1. Device redirected to Sponsored Guest Portal 2. User clicks hotspot to auto-login with embedded creds - Can also login with a different

More information

HTML and CSS MIS Konstantin Bauman. Department of MIS Fox School of Business Temple University

HTML and CSS MIS Konstantin Bauman. Department of MIS Fox School of Business Temple University HTML and CSS MIS 2402 Konstantin Bauman Department of MIS Fox School of Business Temple University 2 HTML Quiz Date: 9/13/18 next Thursday HTML, CSS 14 steps, 25 points 1 hour 20 minutes Use class workstations

More information

Week 13 Thursday (with Page 5 corrections)

Week 13 Thursday (with Page 5 corrections) Week 13 Thursday (with Page 5 corrections) Quizzes: HTML/CSS and JS available and due before 10 pm next Tuesday, May 1 st. You may do your own web research to answer, but do not ask classmates, friends,

More information

Last &me: Javascript (forms and func&ons)

Last &me: Javascript (forms and func&ons) Let s debug some code together: hkp://www.clsp.jhu.edu/~anni/cs103/test_before.html hkp://www.clsp.jhu.edu/~anni/cs103/test_arer.html

More information

<body> <form id="myform" name="myform"> <!-- form child elements go in here --> </form> </body>

<body> <form id=myform name=myform> <!-- form child elements go in here --> </form> </body> ITEC 136 Business Programming Concepts Week 08, Part 01 Overview 1 Week 7 Review Sentinel controlled loops Results controlled loops Flag controlled loops break and continue keywords Nested loops Loop variable

More information

JavaScript and the DOM MIS Konstantin Bauman. Department of MIS Fox School of Business Temple University

JavaScript and the DOM MIS Konstantin Bauman. Department of MIS Fox School of Business Temple University JavaScript and the DOM MIS 2402 Konstantin Bauman Department of MIS Fox School of Business Temple University Exam 2 Date: 11/06/18 four weeks from now! JavaScript, jquery 1 hour 20 minutes Use class workstations

More information

1.2 * allow custom user list to be passed in * publish changes to a channel

1.2 * allow custom user list to be passed in * publish changes to a channel ToDoList /*** USAGE: ToDoList() Embed a TODO-list into a page. The TODO list allows users to cre Items that are due are highlighted in yellow, items passed due ar list can be added to any page. The information

More information

<form>. input elements. </form>

<form>. input elements. </form> CS 183 4/8/2010 A form is an area that can contain form elements. Form elements are elements that allow the user to enter information (like text fields, text area fields, drop-down menus, radio buttons,

More information

Control Flow. INFO/CSE 100, Spring 2006 Fluency in Information Technology.

Control Flow. INFO/CSE 100, Spring 2006 Fluency in Information Technology. Control Flow INFO/CSE 100, Spring 2006 Fluency in Information Technology http://www.cs.washington.edu/100 1 Reading Readings and References» Fluency with Information Technology Chapter 21, Iteration Principles

More information

ajax1.html 1/2 lectures/7/src/ ajax1.html 2/2 lectures/7/src/

ajax1.html 1/2 lectures/7/src/ ajax1.html 2/2 lectures/7/src/ ajax1.html 1/2 3: ajax1.html 5: Gets stock quote from quote1.php via Ajax, displaying result with alert(). 6: 7: David J. Malan 8: Dan Armendariz 9: Computer Science E-75 10: Harvard Extension School 11:

More information

Problem Description Earned Max 1 HTML / CSS Tracing 20 2 PHP 20 3 JS 20 4 JS / Ajax / JSON 20 5 SQL 20 X Extra Credit 1 TOTAL Total Points 100

Problem Description Earned Max 1 HTML / CSS Tracing 20 2 PHP 20 3 JS 20 4 JS / Ajax / JSON 20 5 SQL 20 X Extra Credit 1 TOTAL Total Points 100 CSE 154, Spring 2014 Final Exam, Tuesday, June 10, 2014 Name: Quiz Section: Student ID #: TA: Rules: You have 110 minutes to complete this exam. You may receive a deduction if you keep working after the

More information

Dynamic HTML becomes HTML5. HTML Forms and Server Processing. Form Submission to Web Server. DHTML - Mouse Events. CMST385: Slide Set 8: Forms

Dynamic HTML becomes HTML5. HTML Forms and Server Processing. Form Submission to Web Server. DHTML - Mouse Events. CMST385: Slide Set 8: Forms HTML Forms and Server Processing Forms provide a standard data entry method for users to send information to a web server Clicking button calls a script on server CGI = Common Gateway Interface CGI scripts

More information

Hyperlinks, Tables, Forms and Frameworks

Hyperlinks, Tables, Forms and Frameworks Hyperlinks, Tables, Forms and Frameworks Web Authoring and Design Benjamin Kenwright Outline Review Previous Material HTML Tables, Forms and Frameworks Summary Review/Discussion Email? Did everyone get

More information

HTTP Communication on Tizen

HTTP Communication on Tizen HTTP Communication on Tizen Spring 2015 Soo Dong Kim, Ph.D. Professor, Department of Computer Science Software Engineering Laboratory Soongsil University Office 02-820-0909 Mobile 010-7392-2220 sdkim777@gmail.com

More information

CSE 154 LECTURE 8: FORMS

CSE 154 LECTURE 8: FORMS CSE 154 LECTURE 8: FORMS Web data most interesting web pages revolve around data examples: Google, IMDB, Digg, Facebook, YouTube, Rotten Tomatoes can take many formats: text, HTML, XML, multimedia many

More information

1 Form Basics CSC309

1 Form Basics CSC309 1 Form Basics Web Data 2! Most interesting web pages revolve around data! examples: Google, IMDB, Digg, Facebook, YouTube! can take many formats: text, HTML, XML, multimedia! Many of them allow us to access

More information

ゼミ Wiki の再構築について 資料編 加納さおり

ゼミ Wiki の再構築について 資料編 加納さおり Wiki [ Fukuda Semi Wiki] [ 2 wiki] [ 3 ] [ 4 ] [ 5 ] [ 6 ] [ 7 ] [ 8 ] [ 9 ] [ 10 ] [ 11 ] [ 12 ] [ 13 ] [ 14 Menu1] [ 15 Menu2] [ 16 Menu3] [ 17 wiki Menu] [ 18 TOP ] [ 19 ] [ 20 ] [ 20] [ 21 ] [ 22 (

More information

Arena Development 101 / 102 Courses # A280, A281 IMPORTANT: You must have your development environment set up for this class

Arena Development 101 / 102 Courses # A280, A281 IMPORTANT: You must have your development environment set up for this class Arena Development 101 / 102 Courses # A280, A281 IMPORTANT: You must have your development environment set up for this class Presented by: Jeff Maddox Director of Platform Integrations, Ministry Brands

More information

Working Bootstrap Contact form with PHP and AJAX

Working Bootstrap Contact form with PHP and AJAX Working Bootstrap Contact form with PHP and AJAX Tutorial by Ondrej Svestka Bootstrapious.com Today I would like to show you how to easily build a working contact form using Boostrap framework and AJAX

More information

User manual Scilab Cloud API

User manual Scilab Cloud API User manual Scilab Cloud API Scilab Cloud API gives access to your engineering and simulation knowledge through web services which are accessible by any network-connected machine. Table of contents Before

More information

Homework 4: Comparing Search Engine Ranking Algorithms

Homework 4: Comparing Search Engine Ranking Algorithms Homework 4: Comparing Search Engine Ranking Algorithms Objectives: o o Preparation Experience using Solr Investigating ranking strategies In a previous exercise you used crawler4j to crawl a news website.

More information

CSC Javascript

CSC Javascript CSC 4800 Javascript See book! Javascript Syntax How to embed javascript between from an external file In an event handler URL - bookmarklet

More information

Exam Questions Demo https://www.certifyforsure.com/dumps/ Microsoft. Exam Questions

Exam Questions Demo https://www.certifyforsure.com/dumps/ Microsoft. Exam Questions Microsoft Exam Questions 70-480 Programming in HTML5 with JavaScript and CSS3 Version:Demo 1. You are developing a web page that will be divided into three vertical sections. The main content of the site

More information

JavaScript (5A) JavaScript

JavaScript (5A) JavaScript JavaScript (5A) JavaScript Copyright (c) 2012 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any

More information

Chapter 1 - Model Driven Forms

Chapter 1 - Model Driven Forms Chapter 1 - Model Driven Forms Objectives This chapter includes the following model driven forms topics: Setup FormGroup initialization FormControl object Validation SubForms 1.1 Model Driven Forms Overview

More information

By: JavaScript tutorial-a simple calculator

By:  JavaScript tutorial-a simple calculator JavaScript tutorial-a simple calculator In this small sample project, you will learn to create a simple JavaScript calculator. This calculator has only one text box and sixteen buttons. The text box allows

More information

LING 408/508: Programming for Linguists. Lecture 13 October 14 th

LING 408/508: Programming for Linguists. Lecture 13 October 14 th LING 408/508: Programming for Linguists Lecture 13 October 14 th Administrivia Homework 5 graded Homework 5 review Javascript: Forms An SVG-based library: BMI revisited (Next Qme, Javascript regular expressions)

More information

LEAVE REQUEST. User guide Administrator. Version 1.0

LEAVE REQUEST. User guide Administrator. Version 1.0 LEAVE REQUEST User guide Administrator Version 1.0 MENU Overview... 3 Step 1: Install the app to site... 3 Step 2: Create the SharePoint group... 3 Step 3: Add users to the group... 6 Step 4: Change permission

More information

Advantages: simple, quick to get started, perfect for simple forms, don t need to know how form model objects work

Advantages: simple, quick to get started, perfect for simple forms, don t need to know how form model objects work 1 Forms 1.1 Introduction You cannot enter data in an application without forms. AngularJS allowed the user to create forms quickly, using the NgModel directive to bind the input element to the data in

More information

Manual Html A Href Onclick Submit Button

Manual Html A Href Onclick Submit Button Manual Html A Href Onclick Submit Button When you submit the form via clicking the radio button, it inserts properly into Doing a manual refresh (F5 or refresh button) will then display the new updated

More information

Manual Html A Href Onclick Submit Form

Manual Html A Href Onclick Submit Form Manual Html A Href Onclick Submit Form JS HTML DOM. DOM Intro DOM Methods HTML form validation can be done by a JavaScript. If a form field _input type="submit" value="submit" /form_. As shown in a previous

More information

ADVANCED JAVASCRIPT #8

ADVANCED JAVASCRIPT #8 ADVANCED JAVASCRIPT #8 8.1 Review JS 3 A conditional statement can compare two values. Here we check if one variable we declared is greater than another. It is true so the code executes. var cups = 15;

More information

Alloy Ajax in Liferay Portlet

Alloy Ajax in Liferay Portlet Alloy Ajax in Liferay Portlet Liferay serveresource and alloy aui-io-request module made Ajax easy to implement in Liferay Portlet. If you have basic knowledge of Ajax and you want to learn how ajax call

More information

Input and Validation. Mendel Rosenblum. CS142 Lecture Notes - Input

Input and Validation. Mendel Rosenblum. CS142 Lecture Notes - Input Input and Validation Mendel Rosenblum Early web app input: HTTP form tag Product: Deluxe:

More information

HTML MIS Konstantin Bauman. Department of MIS Fox School of Business Temple University

HTML MIS Konstantin Bauman. Department of MIS Fox School of Business Temple University HTML MIS 2402 Konstantin Bauman Department of MIS Fox School of Business Temple University 2 HTML Quiz Date: 9/13/18 in two weeks from now HTML, CSS 14 steps, 25 points 1 hour 20 minutes Use class workstations

More information

Q1. What is JavaScript?

Q1. What is JavaScript? Q1. What is JavaScript? JavaScript was designed to add interactivity to HTML pages JavaScript is a scripting language A scripting language is a lightweight programming language JavaScript is usually embedded

More information

LAB Test 1. Rules and Regulations:-

LAB Test 1. Rules and Regulations:- LAB Test 1 Rules and Regulations:- 1. Individual Test 2. Start at 3.10 pm until 4.40 pm (1 Hour and 30 Minutes) 3. Open note test 4. Send the answer to h.a.sulaiman@ieee.org a. Subject: [LabTest] Your

More information

CGI Programming. What is "CGI"?

CGI Programming. What is CGI? CGI Programming What is "CGI"? Common Gateway Interface A means of running an executable program via the Web. CGI is not a Perl-specific concept. Almost any language can produce CGI programs even C++ (gasp!!)

More information

PHP 5 if...else...elseif Statements

PHP 5 if...else...elseif Statements PHP 5 if...else...elseif Statements Conditional statements are used to perform different actions based on different conditions. PHP Conditional Statements Very often when you write code, you want to perform

More information

INFO / CSE 100 FINAL EXAM SOLUTIONS March 19, 2009

INFO / CSE 100 FINAL EXAM SOLUTIONS March 19, 2009 INFO / CSE 100 FINAL EXAM SOLUTIONS March 19, 2009 1. (5 points) You have a PowerPoint file on your computer called presentation.ppt. You change the filename to presentation.txt and open the file in a

More information

Session 6. JavaScript Part 1. Reading

Session 6. JavaScript Part 1. Reading Session 6 JavaScript Part 1 Reading Reading Wikipedia en.wikipedia.org/wiki/javascript Web Developers Notes www.webdevelopersnotes.com/tutorials/javascript/ JavaScript Debugging www.w3schools.com/js/js_debugging.asp

More information

1. Variables, Again 2. JavaScript Operators Types 3. Iteration: the for-loop 4. Working with Strings 5. Making Decisions 6.

1. Variables, Again 2. JavaScript Operators Types 3. Iteration: the for-loop 4. Working with Strings 5. Making Decisions 6. CMPT 165 INTRODUCTION TO THE INTERNET AND THE WORLD WIDE WEB By Hassan S. Shavarani UNIT7: WORKING WITH JAVASCRIPT 1 TOPICS 1. Variables, Again 2. JavaScript Operators Types 3. Iteration: the for-loop

More information

Session 11. Calling Servlets from Ajax. Lecture Objectives. Understand servlet response formats

Session 11. Calling Servlets from Ajax. Lecture Objectives. Understand servlet response formats Session 11 Calling Servlets from Ajax 1 Lecture Objectives Understand servlet response formats Text Xml Html JSON Understand how to extract data from the XMLHttpRequest object Understand the cross domain

More information

Dingle Coderdojo 6. Project Part 2 (of 2) - Movie Poster And Actor! - Lookup. Week 6

Dingle Coderdojo 6. Project Part 2 (of 2) - Movie Poster And Actor! - Lookup. Week 6 Dingle Coderdojo 6 Week 6 Project Part 2 (of 2) - Movie Poster And Actor! - Lookup This is an extension of what you did the last time (the Movie Poster lookup from Week 5). Make sure you ve finished that

More information

COMP1000 Mid-Session Test 2017s1

COMP1000 Mid-Session Test 2017s1 COMP1000 Mid-Session Test 2017s1 Total Marks: 45 Duration: 55 minutes + 10 min reading time This examination has three parts: Part 1: 15 Multiple Choice Questions (15 marks /45) Part 2: Practical Excel

More information

CISC 1600 Lecture 2.4 Introduction to JavaScript

CISC 1600 Lecture 2.4 Introduction to JavaScript CISC 1600 Lecture 2.4 Introduction to JavaScript Topics: Javascript overview The DOM Variables and objects Selection and Repetition Functions A simple animation What is JavaScript? JavaScript is not Java

More information

Then there are methods ; each method describes an action that can be done to (or with) the object.

Then there are methods ; each method describes an action that can be done to (or with) the object. When the browser loads a page, it stores it in an electronic form that programmers can then access through something known as an interface. The interface is a little like a predefined set of questions

More information

Practice problems. 1 Draw the output for the following code. 2. Draw the output for the following code.

Practice problems. 1 Draw the output for the following code. 2. Draw the output for the following code. Practice problems. 1 Draw the output for the following code. form for Spring Retreat Jacket company Spring Retreat Jacket Order Form please fill in this form and click on

More information

Web Programming Paper Solution (Chapter wise) JavaScript

Web Programming Paper Solution (Chapter wise) JavaScript Built in JS objects. JavaScript Page 1 of 18 Page 2 of 18 Page 3 of 18 Page 4 of 18 Page 5 of 18 Page 6 of 18 Window and Document object in JS. Page 7 of 18 Page 8 of 18 JS code to validate a form which

More information

Project Part 2 (of 2) - Movie Poster And Actor! - Lookup

Project Part 2 (of 2) - Movie Poster And Actor! - Lookup Getting Started 1. Go to http://quickdojo.com 2. Click this: Project Part 2 (of 2) - Movie Poster And Actor! - Lookup This is an extension of what you did the last time (the Movie Poster lookup from Week

More information

APACHE SLING & FRIENDS TECH MEETUP BERLIN, SEPTEMBER Hypermedia API Tools for Sling (HApi) Andrei Dulvac, Adobe

APACHE SLING & FRIENDS TECH MEETUP BERLIN, SEPTEMBER Hypermedia API Tools for Sling (HApi) Andrei Dulvac, Adobe APACHE SLING & FRIENDS TECH MEETUP BERLIN, 28-30 SEPTEMBER 2015 Hypermedia API Tools for Sling (HApi) Andrei Dulvac, Adobe ToC HatEoAS, Hypermedia formats, and semantic data Hypermedia API tools (HApi)

More information

Spring 2014 Interim. HTML forms

Spring 2014 Interim. HTML forms HTML forms Forms are used very often when the user needs to provide information to the web server: Entering keywords in a search box Placing an order Subscribing to a mailing list Posting a comment Filling

More information

ajax1.html 1/2 lectures/9/src/ajax/ ajax1.html 2/2 lectures/9/src/ajax/

ajax1.html 1/2 lectures/9/src/ajax/ ajax1.html 2/2 lectures/9/src/ajax/ ajax1.html 1/2 3: ajax1.html 5: Gets stock quote from quote1.php via Ajax, displaying result with alert(). 6: 7: Computer Science 50 8: David J. Malan 9: 10: --> 1 1 15: 16:

More information

HTML Forms IT WS I - Lecture 11

HTML Forms IT WS I - Lecture 11 HTML Forms IT WS I - Lecture 11 Saurabh Barjatiya International Institute Of Information Technology, Hyderabad 04 October, 2009 Contents Seeing submitted values 1 Seeing submitted values 2 3 Seeing submitted

More information

Session 16. JavaScript Part 1. Reading

Session 16. JavaScript Part 1. Reading Session 16 JavaScript Part 1 1 Reading Reading Wikipedia en.wikipedia.org/wiki/javascript / p W3C www.w3.org/tr/rec-html40/interact/scripts.html Web Developers Notes www.webdevelopersnotes.com/tutorials/javascript/

More information

This project will use an API from to retrieve a list of movie posters to display on screen.

This project will use an API from   to retrieve a list of movie posters to display on screen. Getting Started 1. Go to http://quickdojo.com 2. Click this: Project Part 1 (of 2) - Movie Poster Lookup Time to put what you ve learned to action. This is a NEW piece of HTML, so start quickdojo with

More information

Exercise 11. <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> </head> <body> </body> </html>

Exercise 11. <!DOCTYPE html> <html> <head> <meta name=viewport content=width=device-width, initial-scale=1> </head> <body> </body> </html> Exercise 11 The purpose of this exercise is to demonstrate the similarity between different program languages. In this exercise, we will use Javascript to make the same Time Value of Money Solver as in

More information

PRAjax PHP Reflected Ajax Developer Manual

PRAjax PHP Reflected Ajax Developer Manual PRAjax PHP Reflected Ajax Developer Manual Index PRAjax PHP Reflected Ajax... 1 Index... 2 What is PRAjax?... 3 PRAjax in short... 3 Schematic overview... 4 Introduction... 5 Requirements... 5 Installation...

More information

AJAX(Asynchronous Javascript + XML) Creating client-side dynamic Web pages

AJAX(Asynchronous Javascript + XML) Creating client-side dynamic Web pages AJAX(Asynchronous Javascript + XML) Creating client-side dynamic Web pages AJAX = Asynchronous JavaScript and XML.AJAX is not a new programming language, but a new way to use existing standards. AJAX is

More information

Webinar. The Lighthouse Studio Scripting Series. JavaScript Sawtooth Software, Inc.

Webinar. The Lighthouse Studio Scripting Series. JavaScript Sawtooth Software, Inc. The Lighthouse Studio Scripting Series JavaScript 2 HTML 3 CSS 4 JavaScript 5 jquery (enhanced JavaScript) 6 Perl 7 HTML (Hyper Text Markup Language) 8 HTML 9 What is HTML? HTML is the language for creating

More information

CPSC 481: CREATIVE INQUIRY TO WSBF

CPSC 481: CREATIVE INQUIRY TO WSBF CPSC 481: CREATIVE INQUIRY TO WSBF J. Yates Monteith, Fall 2013 Schedule HTML and CSS PHP HTML Hypertext Markup Language Markup Language. Does not execute any computation. Marks up text. Decorates it.

More information

ADVANCED JAVASCRIPT. #7

ADVANCED JAVASCRIPT. #7 ADVANCED JAVASCRIPT. #7 7.1 Review JS 3 A simple javascript functions is alert(). It's a good way to test a script is working. It brings up a browser default popup alert window. alert(5); 4 There are 2

More information

Submitting forms (client-side)

Submitting forms (client-side) Client/Server Submitting forms (client-side) Submitting forms (client-side) Submitting forms (client-side) submit.php $len = strlen($_post["password"]); $name = $_POST["name"]; print "Welcome ". $name;

More information

Spring Data JPA, Spring Boot, Oracle, AngulerJS 적용게시판실습 게시판리스트보기.

Spring Data JPA, Spring Boot, Oracle, AngulerJS 적용게시판실습 게시판리스트보기. Spring Data JPA, Spring Boot, Oracle, AngulerJS 적용게시판실습 http://ojc.asia, http://ojcedu.com 게시판리스트보기 Spring JDBC 또는 MyBatis로만들때보다쉽고빠르게작성할수있다. 스프링컨트롤러는 RestController를적용했으며, 뷰페이지에 Bootstrap 및 AngulerJS 적용했다.

More information

Use of PHP for DB Connection. Middle and Information Tier. Middle and Information Tier

Use of PHP for DB Connection. Middle and Information Tier. Middle and Information Tier Use of PHP for DB Connection 1 2 Middle and Information Tier PHP: built in library functions for interfacing with the mysql database management system $id = mysqli_connect(string hostname, string username,

More information

Integrating the Quotation page with your site

Integrating the Quotation page with your site Integrating the with your site Introduction Until June 2014, for customers to obtain a quote for your service, it was necessary to redirect the customer to the Instant-Quote.co site. This is no longer

More information

Multimedia im Netz Online Multimedia Winter semester 2015/16. Tutorial 07 Minor Subject

Multimedia im Netz Online Multimedia Winter semester 2015/16. Tutorial 07 Minor Subject Multimedia im Netz Online Multimedia Winter semester 2015/16 Tutorial 07 Minor Subject Ludwig-Maximilians-Universität München Online Multimedia WS 2015/16 - Tutorial 06 (NF) - 1 Today s Agenda Recap AJAX

More information

Form Validation (with jquery, HTML5, and CSS) MIS Konstantin Bauman. Department of MIS Fox School of Business Temple University

Form Validation (with jquery, HTML5, and CSS) MIS Konstantin Bauman. Department of MIS Fox School of Business Temple University Form Validation (with jquery, HTML5, and CSS) MIS 2402 Konstantin Bauman Department of MIS Fox School of Business Temple University Exam 2 Date: 11/06/18 three weeks from now! JavaScript, jquery 1 hour

More information

A conditional statement can compare two values. Here we check if one variable we declared is greater than another. It is true so the code executes.

A conditional statement can compare two values. Here we check if one variable we declared is greater than another. It is true so the code executes. ANGULARJS #7 7.1 Review JS 3 A conditional statement can compare two values. Here we check if one variable we declared is greater than another. It is true so the code executes. var cups = 15; var saucers

More information

Developing Apps for the BlackBerry PlayBook

Developing Apps for the BlackBerry PlayBook Developing Apps for the BlackBerry PlayBook Lab # 4: Getting Started with Ajax and jquery Part 2 The objective of this lab is to continue reviewing some of the concepts in communication with external data

More information

DOM Primer Part 2. Contents

DOM Primer Part 2. Contents DOM Primer Part 2 Contents 1. Event Programming 1.1 Event handlers 1.2 Event types 1.3 Structure modification 2. Forms 2.1 Introduction 2.2 Scripting interface to input elements 2.2.1 Form elements 2.2.2

More information

Ajax. David Matuszek's presentation,

Ajax. David Matuszek's presentation, Ajax David Matuszek's presentation, http://www.cis.upenn.edu/~matuszek/cit597-2007/index.html Oct 20, 2008 The hype Ajax (sometimes capitalized as AJAX) stands for Asynchronous JavaScript And XML Ajax

More information

Session 17. JavaScript Part 2. W3C DOM Reading and Reference. Background and introduction.

Session 17. JavaScript Part 2. W3C DOM Reading and Reference. Background and introduction. Session 17 JavaScript Part 2 1 W3C DOM Reading and Reference Background and introduction www.w3schools.com/htmldom/default.asp Reading a good tutorial on the use of W3C DOM to modify html www.builderau.com.au/program/javascript/soa/ac

More information

VALIDATING USING REGULAR EXPRESSIONS Understanding Regular Expression Characters:

VALIDATING USING REGULAR EXPRESSIONS Understanding Regular Expression Characters: VALIDATING USING REGULAR EXPRESSIONS Understanding Regular Expression Characters: Simple: "^\S+@\S+$" Advanced: "^([\w-\.]+)@((\[[0-9]1,3\.[0-9]1,3\.[0-9]1,3\.) (([\w-]+\.)+))([a-za-z]2,4 [0-9]1,3)(\]?)$"

More information