Javascript. UNIVERSITY OF MASSACHUSETTS AMHERST CMPSCI 120 Fall 2010

Size: px
Start display at page:

Download "Javascript. UNIVERSITY OF MASSACHUSETTS AMHERST CMPSCI 120 Fall 2010"

Transcription

1 Lecture 21 Javascript Announcements Reminder: beginning with Homework #7, Javascript assignments must be submitted using a format described in an attachment to HW#7 3rd Exam date set for 12/14 in Goessmann Lab

2 Javascript Object Model Browser Object Model (BOM) Document Object Model (DOM) What is the DOM? The DOM is a W3C standard. separated into 3 different levels: Core DOM,XML DOM and HTML DOM The DOM defines the objects and properties of all document elements, and the methods (interface) to access them. 2

3 navigator Object See Q10.6, W3C <script language="javascript"> document.write("<font size=+1><b>\ The properties of the \"navigator\" object are:</b><br>"); for(var property in navigator){ document.write(property + "<br>"); </script> <script language="javascript > var BrowserName= navigator.appname; var BrowserVersion = navigator.appversion; var BrowserAgent= navigator.useragent; var platform= navigator.platform; </script> window Object Where all the action happens Properties: Methods: 3

4 window Examples Open a new window (s) Q10.7 W3C W3C Open a new window and close it Q10.8 Open a new window, scale and close it Q10.9 Manipulate the status bar Q10.10 Manipulate the title and status bars Q10.11 Enter data into a Text Box W3C W3C Objects in the window Object location Object Q10.20 Used to access the URL of the document currently loaded history Object Q10.21 Keeps track of the pages visited screen Object W3C 4

5 Menus and Navigation Bars Back to the DOM? The DOM defines the objects and properties of all document elements, and the methods (interface) to access them. 5

6 Accessing document object document objects are created for you whenever you load a webpage does so automatically, even if there's not one line of JavaScript code on your page, as opposed to the Date object, for example. forms are accessible via element objects, images are accessible through image objects, etc. DOM Nodes Nodes everything in an HTML document is a node entire document is a document node every HTML tag is an element node text in the HTML elements are text nodes HTML attributes are attribute nodes comments are comment nodes 6

7 Nodes <html> <head> <title>my Page</title> </head> <body> <h1>dom is fun</h1> <p>hello world!</p> </body> </html> document node <html> element nodes <head> <body> <title> <h1> <p> DOM is fun Hello world! text nodes My Page The root node is <html> and has two child nodes; <head> and <body> <head> node holds a <title> node. <body> node holds a <h1> and <p> node text is always stored in text nodes common error in DOM processing is to expect an element node to contain text. Node Parents, Children, and Siblings nodes in the node tree have a hierarchical relationship to each other parent nodes have children; children on the same level are called siblings the top node is called the root every node, except the root, has exactly one parent node a node can have any number of children a leaf is a node with no children siblings are nodes with the same parent 7

8 Node Parents, Children, and Siblings child_of <html> root <head> <body> parent_of <title> <h1> <p> DOM is fun Hello world! My Page leaf sib_of Node Parents, Children, and Siblings child_of root sib_of parent_of 8

9 HTML DOM Properties typical DOM properties: x.innerhtml - the inner text value of x (a HTML element) x.nodename - the name of x x.nodevalue - the value of x x.parentnode - the parent node of x x.childnodes - the child nodes of x x.attributes - the attributes nodes of x HTML DOM Methods Examples x.getelementbyid(id) - get the element with a specified id x.getelementsbytagname(name) - get all elements with a specified tag name x.appendchild(node) - insert a child node to x x.removechild(node) - remove a child node from x 9

10 document Object Q11.3 Q11.4 JavaScript, DOM & HTML elements The HTML DOM and JavaScript can be used to change the inner content and attributes of HTML elements dynamically Example 1 - Change the Background Color 10

11 JavaScript, DOM & HTML elements Example 2 - Change the image source function showpic(whichpic) { var source = whichpic.getattribute("href"); var placeholder = document.getelementbyid("placeholder"); placeholder.setattribute("src",source); var text = whichpic.getattribute("title"); var description = document.getelementbyid("description"); description.firstchild.nodevalue = text; document Object 11

12 form Object The Form object represents an HTML form. For each instance of an HTML <form> tag in a document, a Form object is created. Forms are used to prompt users for input. The input data is normally posted to a server for processing. form Object examples W3C, W3C 12

13 HTML Forms and Input A form is an area that can contain form elements that allow the user to enter information E.g. text fields, textarea fields, drop-down menus, radio buttons, checkboxes, etc.) A form is defined with the <form> tag <form>. input elements. </form> HTML Forms and Input The most used form tag is the <input> tag The type of input is specified with the type attribute. text fields are used when you want the user to type letters, numbers, etc. in a form. <form> First name:<input type="text" name="firstname" /> <br /> Input fields Last name:<input type="text" name="lastname" /> Password fields</form> Textarea text fields 13

14 HTML Forms and Input Radio Buttons are used when you want the user to select one of a limited number of choices. <form> <input type="radio" name="sex" value="male" /> Male Radio buttons <br /> <input type="radio" name="sex" value="female" /> Female </form> Checkboxes are used when you want the user to select one or more options of a limited number of choices <form> I have a bike:<input type="checkbox" name="vehicle" value="bike" /> <br /> I have a car:<input type="checkbox" name="vehicle" value="car" /> <br /> I have an airplane:<input type="checkbox" name="vehicle" value="airplane" /> Checkboxes </form> Mixed Forms Q11.5 HTML Forms and Input Action Attribute and the Submit Button When the user clicks on the "Submit" button, the content of the form is sent to the server. The form's action attribute defines the name of the file to send the content to. The file defined in the action attribute usually does something with the received input. <form name="input" action="html_form_submit.asp" method="get"> Username: <input type="text" name="user" /> <input type="submit" value="submit" /> </form> If you type some characters in the text field below, and click the "Submit" button, the browser will send your input to a page called html_form_submit.asp. The page will show you the received input. 14

15 Examples create a simple drop-down box on an HTML page. A drop-down box is a selectable list. Simple drop down box Another drop down box draw a border with a caption around your data Fieldset around data add a form to a page. The form contains two input fields and a submit button Form with input fields and a submit button extended forms Form with checkboxes Form with radio buttons how to send from a form Send from a form validation document Object elements[ ] 15

16 Example <form name="formtest" > Please enter your name: <br> <input type="text" size="50" name="user_name"> <p> Please enter your phone: <br> <input type="text" size="30" name="user_phone"> <p> <input type="button" value="show form data" onclick="showform(this.form)";> function showform(myform) { </form> NewWin=window.open('','','width=300,height=200'); name_input="<b>your name: " + myform.user_name.value + "</b><br>"; NewWin.document.write(name_input); phone_input="<b>your phone: " + myform.user_phone.value + "</b><br>"; NewWin.document.write(phone_input); Example function display(){ var output=""; output+="first Name: "+document.aform.first.value; output+="\nlast Name: "+document.aform.last.value; output+="\ncomments: "+document.aform.comments.value; output+="\ncheck box checked: "+document.aform.check.checked; output+="\nselection box: "+document.aform.sel.value; alert(output); //document.aform.button1.value=output; <form name="aform"> First Name:<br> <input type="text" name="first" value="bob" onfocus="this.select()"><br> Last Name:<br> <input type="text" name="last" value="smith"onfocus="this.select()" ><br> Comments:<br> <textarea name="comments" rows="5" cols="100"> text in text area </textarea><br> check box <input type="checkbox" name="check"><br> pick one<br> <select name="sel"> <option value="hw">homework <option value="quiz">quiz <option selected value="exam">exam </select> <br> <input type="button" value="click to display information" onclick="display()" name="button1"> </form> </body> </html> 16

17 Pulldown <html> <head><title>drop-down Menus</title> <script language="javascript"> function schedule(f){ if(f.menu1.selectedindex == 0){ // Could also say: document.form1.menu1.selectedindex f.text1.value="pl100, Feb 3-7, 9am to 5pm, Room 2133, Dr. Baloney " // Could also say: document.form1.text1.value if(f.menu1.selectedindex == 1){ f.text1.value="pl200 Feb am to 5pm, Room 209B, Ms. Eclectic"; if(f.menu1.selectedindex == 2){ f.text1.value="ux101 Mar 2-6 9am to 5pm, Room 209, Mr. Nerdly"; if(f.menu1.selectedindex == 3){ f.text1.value="sh201 Apr am to 5pm, Room 209B, Miss Bashing"; </script> <body bgcolor=lightgreen> <font face=arial > <b> <form name="form1"> Select a Course<br> <select name="menu1" size="4" onchange="schedule(this.form)"> <option name="choice1" value="perl1">intro to Perl</option> <option name="choice2" value="perl2">advanced Perl</option> <option name="choice3" value="unix1">intro to Unix</option> <option name="choice4" value="shell1">shell Programming</option> </select><p> <input type="text" name="text1" size=60 /> </form> </body></html> Accessing images & creating rollovers As with forms, images are accessible through "image object" image Object properties Change the height and width of an image Change the src of an image Sequencing Images Q11.33 Selecting an image Q

18 Creating an image rollover effect assigning a new image to the src property of the image each time the onmouseover event handler is fired inside an image link, we change the image onmouseover. <html> <head><title>preloading Images</title></head> <h2> This Is Baby William</h2> <script language="javascript"> if(document.images){ var baby1=new Image(); // Preload an image baby1.src="baby1image.jpg"; if (document.images){ var baby2=new Image(); // Preload an image baby2.src="baby2image.jpg"; </script> <body bgcolor="cornflowerblue"> <a href="#" onmouseover="document.willy.src=baby2.src;" onmouseout="document.willy.src=baby1.src;"> <img name="willy" src="baby1image.jpg" </body> </html> align="left" alt="baby" border=2 hspace="10" width="220" height="250"> Q11.35 Changing on a click Q11-6 Preloading images load an image into cache before being used, so it appears instantaneously when needed good for change of image in effects like rollover images and image slideshows. create an instance of the image object in the HEAD section of the page, and assigning the image we wish to preload to its src property example: <head> <script type="text/javascript"> <!-- image01= newimage() image01.src="1.gif image02= new Image() image02.src="3.gif"//--> </script> </head> repeat this for every image you wish to preload. 18

Javascript. UNIVERSITY OF MASSACHUSETTS AMHERST CMPSCI 120 Fall 2010

Javascript. UNIVERSITY OF MASSACHUSETTS AMHERST CMPSCI 120 Fall 2010 Lecture 22 Javascript Announcements Homework#7 now due 11/24 at noon Reminder: beginning with Homework #7, Javascript assignments must be submitted using a format described in an attachment to HW#7 I will

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

<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

COMS W3101: SCRIPTING LANGUAGES: JAVASCRIPT (FALL 2018)

COMS W3101: SCRIPTING LANGUAGES: JAVASCRIPT (FALL 2018) COMS W3101: SCRIPTING LANGUAGES: JAVASCRIPT (FALL 2018) RAMANA ISUKAPALLI RAMANA@CS.COLUMBIA.EDU 1 LECTURE-1 Course overview See http://www.cs.columbia.edu/~ramana Overview of HTML Formatting, headings,

More information

HTML Form. Kanida Sinmai

HTML Form. Kanida Sinmai HTML Form Kanida Sinmai ksinmai@tsu.ac.th http://mis.csit.sci.tsu.ac.th/kanida HTML Form HTML forms are used to collect user input. The element defines an HTML form: . form elements. Form

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

CMPT 165 INTRODUCTION TO THE INTERNET AND THE WORLD WIDE WEB

CMPT 165 INTRODUCTION TO THE INTERNET AND THE WORLD WIDE WEB CMPT 165 INTRODUCTION TO THE INTERNET AND THE WORLD WIDE WEB Unit 8 HTML Forms and Basic CGI Slides based on course material SFU Icons their respective owners 1 Learning Objectives In this unit you will

More information

HTML and DHTML. Content. User Interaction Client-Side. Building ASP.NET Web Pages. Introduction. Web Applications Development with

HTML and DHTML. Content. User Interaction Client-Side. Building ASP.NET Web Pages. Introduction. Web Applications Development with Content Introduction User Interaction Client-Side HTMLandDHTML DOM, Scripting Building Web Pages Web Controls, Themes and Master Pages State Management Techniques ADO.NET AJAX Validating Data Deploying

More information

HTML. Asst. Prof. Dr. Kanda Runapongsa Saikaew Department of Computer Engineering Khon Kaen University

HTML. Asst. Prof. Dr. Kanda Runapongsa Saikaew Department of Computer Engineering Khon Kaen University HTML Asst. Prof. Dr. Kanda Runapongsa Saikaew (krunapon@kku.ac.th) Department of Computer Engineering Khon Kaen University 1 What is an HTML File? HTML stands for Hyper Text Markup Language An HTML file

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

Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM Advanced Internet Technology Lab.

Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM Advanced Internet Technology Lab. Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM 5049 Advanced Internet Technology Lab Lab # 1 Eng. Haneen El-masry February, 2015 Objective To be familiar with

More information

COMPUTER APPLICATIONS IN BUSINESS FYBMS SEM II

COMPUTER APPLICATIONS IN BUSINESS FYBMS SEM II CHAPTER 1: HTML 1. What is HTML? Define its structure. a. HTML [Hypertext Markup Language] is the main markup language for creating web pages and other information that can be displayed in a web browser.

More information

Web Technologies - by G. Sreenivasulu Handout - 1 UNIT - I

Web Technologies - by G. Sreenivasulu Handout - 1 UNIT - I INTRODUCTION: UNIT - I HTML stands for Hyper Text Markup Language.HTML is a language for describing web pages.html is a language for describing web pages.html instructions divide the text of a document

More information

HTML Element A pair of tags and the content these include are known as an element

HTML Element A pair of tags and the content these include are known as an element HTML Tags HTML tags are used to mark-up HTML elements. HTML tags are surrounded by the two characters < and >. The surrounding characters are called angle brackets HTML tags are not case sensitive,

More information

LAB MANUAL SUBJECT: WEB TECHNOLOGY CLASS : T.E (COMPUTER) SEMESTER: VI

LAB MANUAL SUBJECT: WEB TECHNOLOGY CLASS : T.E (COMPUTER) SEMESTER: VI LAB MANUAL SUBJECT: WEB TECHNOLOGY CLASS : T.E (COMPUTER) SEMESTER: VI INDEX No. Title Pag e No. 1 Implements Basic HTML Tags 3 2 Implementation Of Table Tag 4 3 Implementation Of FRAMES 5 4 Design A FORM

More information

HTML Forms. By Jaroslav Mohapl

HTML Forms. By Jaroslav Mohapl HTML Forms By Jaroslav Mohapl Abstract How to write an HTML form, create control buttons, a text input and a text area. How to input data from a list of items, a drop down list, and a list box. Simply

More information

Chapter 3 HTML Multimedia and Inputs

Chapter 3 HTML Multimedia and Inputs Sungkyunkwan University Chapter 3 HTML Multimedia and Inputs Prepared by D. T. Nguyen and H. Choo Web Programming Copyright 2000-2018 Networking Laboratory 1/45 Copyright 2000-2012 Networking Laboratory

More information

Comp-206 : Introduction to Software Systems Lecture 23. Alexandre Denault Computer Science McGill University Fall 2006

Comp-206 : Introduction to Software Systems Lecture 23. Alexandre Denault Computer Science McGill University Fall 2006 HTML, CSS Comp-206 : Introduction to Software Systems Lecture 23 Alexandre Denault Computer Science McGill University Fall 2006 Course Evaluation - Mercury 22 / 53 41.5% Assignment 3 Artistic Bonus There

More information

IS 242 Web Application Development I

IS 242 Web Application Development I IS 242 Web Application Development I Lecture 11: Introduction to JavaScript (Part 4) Marwah Alaofi Outlines of today s lecture Events Assigning events using DOM Dom nodes Browser Object Model (BOM) 2 Event

More information

SYBMM ADVANCED COMPUTERS QUESTION BANK 2013

SYBMM ADVANCED COMPUTERS QUESTION BANK 2013 CHAPTER 1: BASIC CONCEPTS OF WEB DESIGNING 1. What is the web? What are the three ways you can build a webpage? The World Wide Web (abbreviated as WWW or W3, commonly known as the web), is a system of

More information

Web Publishing with HTML

Web Publishing with HTML Web Publishing with HTML MSc Induction Tutorials Athena Eftychiou PhD Student Department of Computing 1 Objectives Provide a foundation on Web Publishing by introducing basic notations and techniques like

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

Overview of Forms. Forms are used all over the Web to: Types of forms: Accept information Provide interactivity

Overview of Forms. Forms are used all over the Web to: Types of forms: Accept information Provide interactivity HTML Forms Overview of Forms Forms are used all over the Web to: Accept information Provide interactivity Types of forms: Search form, Order form, Newsletter sign-up form, Survey form, Add to Cart form,

More information

Creating and Building Websites

Creating and Building Websites Creating and Building Websites Stanford University Continuing Studies CS 21 Mark Branom branom@alumni.stanford.edu Course Web Site: http://web.stanford.edu/group/csp/cs21 Week 7 Slide 1 of 25 Week 7 Unfinished

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

JavaScript is described in detail in many books on the subject, and there is excellent tutorial material at

JavaScript is described in detail in many books on the subject, and there is excellent tutorial material at JavaScript (last updated April 15, 2013: LSS) JavaScript is a scripting language, specifically for use on web pages. It runs within the browser (that is to say, it is a client- side scripting language),

More information

HTML Tables and. Chapter Pearson. Fundamentals of Web Development. Randy Connolly and Ricardo Hoar

HTML Tables and. Chapter Pearson. Fundamentals of Web Development. Randy Connolly and Ricardo Hoar HTML Tables and Forms Chapter 5 2017 Pearson http://www.funwebdev.com - 2 nd Ed. HTML Tables A grid of cells A table in HTML is created using the element Tables can be used to display: Many types

More information

As we design and build out our HTML pages, there are some basics that we may follow for each page, site, and application.

As we design and build out our HTML pages, there are some basics that we may follow for each page, site, and application. Extra notes - Client-side Design and Development Dr Nick Hayward HTML - Basics A brief introduction to some of the basics of HTML. Contents Intro element add some metadata define a base address

More information

The Hypertext Markup Language (HTML) Part II. Hamid Zarrabi-Zadeh Web Programming Fall 2013

The Hypertext Markup Language (HTML) Part II. Hamid Zarrabi-Zadeh Web Programming Fall 2013 The Hypertext Markup Language (HTML) Part II Hamid Zarrabi-Zadeh Web Programming Fall 2013 2 Outline HTML Structures Tables Forms New HTML5 Elements Summary HTML Tables 4 Tables Tables are created with

More information

A. Using technology correctly, so that your site will still function for users who don t have these technologies

A. Using technology correctly, so that your site will still function for users who don t have these technologies 1. What does graceful degradation mean in the context of our class? A. Using technology correctly, so that your site will still function for users who don t have these technologies B. Eliminating the implementation

More information

Programming of web-based systems Introduction to HTML5

Programming of web-based systems Introduction to HTML5 Programming of web-based systems Introduction to HTML5 Agenda 1. HTML5 as XML 2. Basic body elements 3. Text formatting and blocks 4. Tables 5. File paths 6. Head elements 7. Layout elements 8. Entities

More information

Summary 4/5. (contains info about the html)

Summary 4/5. (contains info about the html) Summary Tag Info Version Attributes Comment 4/5

More information

Web Forms. Survey or poll Contact us Sign up for an newsletter Register for an event

Web Forms. Survey or poll Contact us Sign up for an  newsletter Register for an event Web Forms Survey or poll Contact us Sign up for an email newsletter Register for an event Web Forms All our web pages thus far have had a one-way flow of information, from us to our web visitors. Now we'll

More information

Internet Technologies 5-Dynamic Web. F. Ricci 2010/2011

Internet Technologies 5-Dynamic Web. F. Ricci 2010/2011 Internet Technologies 5-Dynamic Web F. Ricci 2010/2011 Content The "meanings" of dynamic Building dynamic content with Java EE (server side) HTML forms: how to send to the server the input PHP: a simpler

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

UNIT-02 Hyper Text Markup Language (HTML) UNIT-02/LECTURE-01 Introduction to Hyper Text Markup Language (HTML) About HTML: [RGPV/Dec 2013(4)]

UNIT-02 Hyper Text Markup Language (HTML) UNIT-02/LECTURE-01 Introduction to Hyper Text Markup Language (HTML) About HTML: [RGPV/Dec 2013(4)] 1 UNIT-02 Hyper Text Markup Language (HTML) UNIT-02/LECTURE-01 Introduction to Hyper Text Markup Language (HTML) About HTML: [RGPV/Dec 2013(4)] So the first thing is that html the full form is Hyper Text

More information

INTRODUCTION TO WEB DEVELOPMENT AND HTML. Lecture 13: Intro to JavaScript - Spring 2011

INTRODUCTION TO WEB DEVELOPMENT AND HTML. Lecture 13: Intro to JavaScript - Spring 2011 INTRODUCTION TO WEB DEVELOPMENT AND HTML Lecture 13: Intro to JavaScript - Spring 2011 Outline Intro to JavaScript What is JavaScript? JavaScript!= Java Intro to JavaScript JavaScript is a lightweight

More information

JavaScript!= Java. Intro to JavaScript. What is JavaScript? Intro to JavaScript 4/17/2013 INTRODUCTION TO WEB DEVELOPMENT AND HTML

JavaScript!= Java. Intro to JavaScript. What is JavaScript? Intro to JavaScript 4/17/2013 INTRODUCTION TO WEB DEVELOPMENT AND HTML INTRODUCTION TO WEB DEVELOPMENT AND HTML Intro to JavaScript Lecture 13: Intro to JavaScript - Spring 2013 What is JavaScript? JavaScript!= Java Intro to JavaScript JavaScript is a lightweight programming

More information

E-Applications. XML and DOM in Javascript. Michail Lampis

E-Applications. XML and DOM in Javascript. Michail Lampis E-Applications XML and DOM in Javascript Michail Lampis michail.lampis@dauphine.fr Acknowledgment Much of the material on these slides follows the tutorial given in: http://www.w3schools.com/dom/ XML XML

More information

Networking and Internet

Networking and Internet Today s Topic Lecture 13 Web Fundamentals Networking and Internet LAN Web pages Web resources Web client Web Server HTTP Protocol HTML & HTML Forms 1 2 LAN (Local Area Network) Networking and Internet

More information

HTML Tables and Forms. Outline. Review. Review. Example Demo/ Walkthrough. CS 418/518 Web Programming Spring Tables to Display Data"

HTML Tables and Forms. Outline. Review. Review. Example Demo/ Walkthrough. CS 418/518 Web Programming Spring Tables to Display Data CS 418/518 Web Programming Spring 2014 HTML Tables and Forms Dr. Michele Weigle http://www.cs.odu.edu/~mweigle/cs418-s14/ Outline! Assigned Reading! Chapter 4 "Using Tables to Display Data"! Chapter 5

More information

CSS CSS how to display to solve a problem External Style Sheets CSS files CSS Syntax

CSS CSS how to display to solve a problem External Style Sheets CSS files CSS Syntax CSS CSS stands for Cascading Style Sheets Styles define how to display HTML elements Styles were added to HTML 4.0 to solve a problem External Style Sheets can save a lot of work External Style Sheets

More information

CS 350 COMPUTER/HUMAN INTERACTION. Lecture 6

CS 350 COMPUTER/HUMAN INTERACTION. Lecture 6 CS 350 COMPUTER/HUMAN INTERACTION Lecture 6 Setting up PPP webpage Log into lab Linux client or into csserver directly Webspace (www_home) should be set up Change directory for CS 350 assignments cp r

More information

CHAPTER 2 MARKUP LANGUAGES: XHTML 1.0

CHAPTER 2 MARKUP LANGUAGES: XHTML 1.0 WEB TECHNOLOGIES A COMPUTER SCIENCE PERSPECTIVE CHAPTER 2 MARKUP LANGUAGES: XHTML 1.0 Modified by Ahmed Sallam Based on original slides by Jeffrey C. Jackson reserved. 0-13-185603-0 HTML HELLO WORLD! Document

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

Introduction to DHTML

Introduction to DHTML Introduction to DHTML HTML is based on thinking of a web page like a printed page: a document that is rendered once and that is static once rendered. The idea behind Dynamic HTML (DHTML), however, is to

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

INLEDANDE WEBBPROGRAMMERING MED JAVASCRIPT INTRODUCTION TO WEB PROGRAMING USING JAVASCRIPT

INLEDANDE WEBBPROGRAMMERING MED JAVASCRIPT INTRODUCTION TO WEB PROGRAMING USING JAVASCRIPT INLEDANDE WEBBPROGRAMMERING MED JAVASCRIPT INTRODUCTION TO WEB PROGRAMING USING JAVASCRIPT ME152A L4: 1. HIGHER ORDER FUNCTIONS 2. REGULAR EXPRESSIONS 3. JAVASCRIPT - HTML 4. DOM AND EVENTS OUTLINE What

More information

New Media Production Lecture 7 Javascript

New Media Production Lecture 7 Javascript New Media Production Lecture 7 Javascript Javascript Javascript and Java have almost nothing in common. Netscape developed a scripting language called LiveScript. When Sun developed Java, and wanted Netscape

More information

Form Overview. Form Processing. The Form Element. CMPT 165: Form Basics

Form Overview. Form Processing. The Form Element. CMPT 165: Form Basics Form Overview CMPT 165: Form Basics Tamara Smyth, tamaras@cs.sfu.ca School of Computing Science, Simon Fraser University October 26, 2011 A form is an HTML element that contains and organizes objects called

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

HTML HTML. Chris Seddon CRS Enterprises Ltd 1

HTML HTML. Chris Seddon CRS Enterprises Ltd 1 Chris Seddon seddon-software@keme.co.uk 2000-12 CRS Enterprises Ltd 1 2000-12 CRS Enterprises Ltd 2 Reference Sites W3C W3C w3schools DevGuru Aptana GotAPI Dog http://www.w3.org/ http://www.w3schools.com

More information

1.264 Lecture 12. HTML Introduction to FrontPage

1.264 Lecture 12. HTML Introduction to FrontPage 1.264 Lecture 12 HTML Introduction to FrontPage HTML Subset of Structured Generalized Markup Language (SGML), a document description language SGML is ISO standard Current version of HTML is version 4.01

More information

SilkTest 2009 R2. Rules for Object Recognition

SilkTest 2009 R2. Rules for Object Recognition SilkTest 2009 R2 Rules for Object Recognition Borland Software Corporation 4 Hutton Centre Dr., Suite 900 Santa Ana, CA 92707 Copyright 2009 Micro Focus (IP) Limited. Rights Reserved. SilkTest contains

More information

core programming HTML Forms Sending Data to Server-Side Programs Marty Hall, Larry Brown

core programming HTML Forms Sending Data to Server-Side Programs Marty Hall, Larry Brown core programming HTML Forms Sending Data to Server-Side Programs 1 2001-2003 Marty Hall, Larry Brown http:// Agenda Sending data from forms The FORM element Text controls Push buttons Check boxes and radio

More information

COMS 359: Interactive Media

COMS 359: Interactive Media COMS 359: Interactive Media Agenda Project #3 Review Forms (con t) CGI Validation Design Preview Project #3 report Who is your client? What is the project? Project Three action= http://...cgi method=

More information

UNIT 3 SECTION 1 Answer the following questions Q.1: What is an editor? editor editor Q.2: What do you understand by a web browser?

UNIT 3 SECTION 1 Answer the following questions Q.1: What is an editor? editor editor Q.2: What do you understand by a web browser? UNIT 3 SECTION 1 Answer the following questions Q.1: What is an editor? A 1: A text editor is a program that helps you write plain text (without any formatting) and save it to a file. A good example is

More information

Introduction to using HTML to design webpages

Introduction to using HTML to design webpages Introduction to using HTML to design webpages #HTML is the script that web pages are written in. It describes the content and structure of a web page so that a browser is able to interpret and render the

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

INTERNET & WEB APPLICATION DEVELOPMENT SWE 444. Fall Semester (081) Module 4 (VII): XML DOM

INTERNET & WEB APPLICATION DEVELOPMENT SWE 444. Fall Semester (081) Module 4 (VII): XML DOM INTERNET & WEB APPLICATION DEVELOPMENT SWE 444 Fall Semester 2008-2009 (081) Module 4 (VII): XML DOM Dr. El-Sayed El-Alfy Computer Science Department King Fahd University of Petroleum and Minerals alfy@kfupm.edu.sa

More information

Web Designing HTML5 NOTES

Web Designing HTML5 NOTES Web Designing HTML5 NOTES HTML Introduction What is HTML? HTML is the standard markup language for creating Web pages. HTML stands for Hyper Text Markup Language HTML describes the structure of Web pages

More information

Web Site Design and Development Lecture 23. CS 0134 Fall 2018 Tues and Thurs 1:00 2:15PM

Web Site Design and Development Lecture 23. CS 0134 Fall 2018 Tues and Thurs 1:00 2:15PM Web Site Design and Development Lecture 23 CS 0134 Fall 2018 Tues and Thurs 1:00 2:15PM List box The element shows a list of options in a scroll-able box when size is

More information

Best Practices Chapter 5

Best Practices Chapter 5 Best Practices Chapter 5 Chapter 5 CHRIS HOY 12/11/2015 COMW-283 Chapter 5 The DOM and BOM The BOM stand for the Browser Object Model, it s also the client-side of the web hierarchy. It is made up of a

More information

Lecture (03) from static HTML to

Lecture (03) from static HTML to Lecture (03) from static HTML to dynamic CGI By: Dr. Ahmed ElShafee ١ Dr. Ahmed ElShafee, ACU : Spring 2016, Web Programming Forms Forms add the ability to web pages to not only provide the person viewing

More information

HTML and JavaScript: Forms and Validation

HTML and JavaScript: Forms and Validation HTML and JavaScript: Forms and Validation CISC 282 October 18, 2017 Forms Collection of specific elements know as controls Allow the user to enter information Submit the data to a web server Controls are

More information

CSI 3140 WWW Structures, Techniques and Standards. Markup Languages: XHTML 1.0

CSI 3140 WWW Structures, Techniques and Standards. Markup Languages: XHTML 1.0 CSI 3140 WWW Structures, Techniques and Standards Markup Languages: XHTML 1.0 HTML Hello World! Document Type Declaration Document Instance Guy-Vincent Jourdan :: CSI 3140 :: based on Jeffrey C. Jackson

More information

Student, Perfect Final Exam May 25, 2006 ID: Exam No CS-081/Vickery Page 1 of 6

Student, Perfect Final Exam May 25, 2006 ID: Exam No CS-081/Vickery Page 1 of 6 Student, Perfect Final Exam May 25, 2006 ID: 9999. Exam No. 3193 CS-081/Vickery Page 1 of 6 NOTE: It is my policy to give a failing grade in the course to any student who either gives or receives aid on

More information

HTML 5 Tables and Forms

HTML 5 Tables and Forms Tables for Tabular Data Display HTML 5 Tables and Forms Tables can be used to represet information in a two-dimensional format. Typical table applications include calendars, displaying product catelog,

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

jquery - Other Selectors In jquery the selectors are defined inside the $(" ") jquery wrapper also you have to use single quotes jquery wrapper.

jquery - Other Selectors In jquery the selectors are defined inside the $( ) jquery wrapper also you have to use single quotes jquery wrapper. jquery - Other Selectors In jquery the selectors are defined inside the $(" ") jquery wrapper also you have to use single quotes jquery wrapper. There are different types of jquery selectors available

More information

Silk Test Object Recognition with the Classic Agent

Silk Test Object Recognition with the Classic Agent Silk Test 13.5 Object Recognition with the Classic Agent Micro Focus 575 Anton Blvd., Suite 510 Costa Mesa, CA 92626 Copyright 2012 Micro Focus. rights reserved. Portions Copyright 1992-2009 Borland Software

More information

write vs. writeln Prompting as Page Loads Today s Goals CSCI 2910 Client/Server-Side Programming Intermediate File vs. HTML Output

write vs. writeln Prompting as Page Loads Today s Goals CSCI 2910 Client/Server-Side Programming Intermediate File vs. HTML Output CSCI 2910 Client/Server-Side Programming Topic: JavaScript Part 2 Today s Goals Today s lecture will cover: More objects, properties, and methods of the DOM The Math object Introduction to form validation

More information

1D CIW JavaScript Fundamentals exam

1D CIW JavaScript Fundamentals exam CIW JavaScript Fundamentals exam Version 2.5 QUESTION NO: 1 In JavaScript, ++x+ will add one to the value of x after the assignment is complete. FALSE TRUE QUESTION NO: 2 represent various attributes of

More information

Building Web Based Application using HTML

Building Web Based Application using HTML Introduction to Hypertext Building Web Based Application using HTML HTML: Hypertext Markup Language Hypertext links within and among Web documents connect one document to another Origins of HTML HTML is

More information

c360 Web Connect Configuration Guide Microsoft Dynamics CRM 2011 compatible c360 Solutions, Inc. c360 Solutions

c360 Web Connect Configuration Guide Microsoft Dynamics CRM 2011 compatible c360 Solutions, Inc.   c360 Solutions c360 Web Connect Configuration Guide Microsoft Dynamics CRM 2011 compatible c360 Solutions, Inc. www.c360.com c360 Solutions Contents Overview... 3 Web Connect Configuration... 4 Implementing Web Connect...

More information

JavaScript By: A. Mousavi & P. Broomhead SERG, School of Engineering Design, Brunel University, UK

JavaScript By: A. Mousavi & P. Broomhead SERG, School of Engineering Design, Brunel University, UK Programming for Digital Media EE1707 JavaScript By: A. Mousavi & P. Broomhead SERG, School of Engineering Design, Brunel University, UK 1 References and Sources 1. Javascript & JQuery: interactive front-end

More information

Lecture 5. Connecting Code to Web Page Events

Lecture 5. Connecting Code to Web Page Events This lecture, will learn about 1. Browser Objects 2. Window Object 3. Document Object 4. Location Object 5. Navigator Object 6. History Object 7. Screen Object 8. Events Lecture 5 Not only is Javascript

More information

INFO 2450 Project 6 Web Site Resources and JavaScript Behaviors

INFO 2450 Project 6 Web Site Resources and JavaScript Behaviors INFO 2450 Project 6 Web Site Resources and JavaScript Behaviors Project 6 Objectives: Learn how to create graphical content with specified dimensions and formats for a Web site. Incorporate the site color

More information

NATIONAL DIPLOMA IN COMPUT TER TECHNOLOGY

NATIONAL DIPLOMA IN COMPUT TER TECHNOLOGY UNESCO-NIGERIA TECHNICAL & VOCATIONAL EDUCATION REVITALISATION PROJECT-PHASE II NATIONAL DIPLOMA IN COMPUT TER TECHNOLOGY (COM225) Table of Contents WEEK One (practical)... 6 Learning Outcome... 6 Lab1:

More information

UNIVERSITY OF TORONTO Faculty of Arts and Science APRIL 2016 EXAMINATIONS. CSC309H1 S Programming on the Web Instructor: Ahmed Shah Mashiyat

UNIVERSITY OF TORONTO Faculty of Arts and Science APRIL 2016 EXAMINATIONS. CSC309H1 S Programming on the Web Instructor: Ahmed Shah Mashiyat UNIVERSITY OF TORONTO Faculty of Arts and Science APRIL 2016 EXAMINATIONS CSC309H1 S Programming on the Web Instructor: Ahmed Shah Mashiyat Duration - 2 hours Aid Sheet: Both side of one 8.5 x 11" sheet

More information

<page> 1 Document Summary Document Information <page> 2 Document Structure Text Formatting <page> 3 Links Images <page> 4

<page> 1 Document Summary Document Information <page> 2 Document Structure Text Formatting <page> 3 Links Images <page> 4 Document Summary Document Information Document Structure Text Formatting Links Images Lists Forms Input Type Attributes Select Attributes Option Attributes Table Formatting Objects and iframes iframe Attributes

More information

cwhois Manual Copyright Vibralogix. All rights reserved.

cwhois Manual Copyright Vibralogix. All rights reserved. cwhoistm V2.12 cwhois Manual Copyright 2003-2015 Vibralogix. All rights reserved. This document is provided by Vibralogix for informational purposes only to licensed users of the cwhois product and is

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

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

Programmazione Web a.a. 2017/2018 HTML5

Programmazione Web a.a. 2017/2018 HTML5 Programmazione Web a.a. 2017/2018 HTML5 PhD Ing.Antonino Raucea antonino.raucea@dieei.unict.it 1 Introduzione HTML HTML is the standard markup language for creating Web pages. HTML stands for Hyper Text

More information

Understanding this structure is pretty straightforward, but nonetheless crucial to working with HTML, CSS, and JavaScript.

Understanding this structure is pretty straightforward, but nonetheless crucial to working with HTML, CSS, and JavaScript. Extra notes - Markup Languages Dr Nick Hayward HTML - DOM Intro A brief introduction to HTML's document object model, or DOM. Contents Intro What is DOM? Some useful elements DOM basics - an example References

More information

Dreamweaver: Web Forms

Dreamweaver: Web Forms Dreamweaver: Web Forms Introduction Web forms allow your users to type information into form fields on a web page and send it to you. Dreamweaver makes it easy to create them. This workshop is a follow-up

More information

HTML User Interface Controls. Interactive HTML user interfaces. Document Object Model (DOM)

HTML User Interface Controls. Interactive HTML user interfaces. Document Object Model (DOM) Page 1 HTML User Interface Controls CSE 190 M (Web Programming), Spring 2007 University of Washington Reading: Sebesta Ch. 5 sections 5.1-5.7.2, Ch. 2 sections 2.9-2.9.4 Interactive HTML user interfaces

More information

Web Development & Design Foundations with HTML5

Web Development & Design Foundations with HTML5 1 Web Development & Design Foundations with HTML5 CHAPTER 14 A BRIEF LOOK AT JAVASCRIPT Copyright Terry Felke-Morris 2 Learning Outcomes In this chapter, you will learn how to: Describe common uses of

More information

By Ryan Stevenson. Guidebook #2 HTML

By Ryan Stevenson. Guidebook #2 HTML By Ryan Stevenson Guidebook #2 HTML Table of Contents 1. HTML Terminology & Links 2. HTML Image Tags 3. HTML Lists 4. Text Styling 5. Inline & Block Elements 6. HTML Tables 7. HTML Forms HTML Terminology

More information

Creating Web Pages Using HTML

Creating Web Pages Using HTML Creating Web Pages Using HTML HTML Commands Commands are called tags Each tag is surrounded by Some tags need ending tags containing / Tags are not case sensitive, but for future compatibility, use

More information

Using JavaScript in a compatible way

Using JavaScript in a compatible way Draft: javascript20020518.wpd Printed on May 18, 2002 (3:24pm) Using JavaScript in a compatible way Rafael Palacios* *Universidad Pontificia Comillas, Madrid, Spain Abstract Many web pages use JavaScript

More information

1/6/ :28 AM Approved New Course (First Version) CS 50A Course Outline as of Fall 2014

1/6/ :28 AM Approved New Course (First Version) CS 50A Course Outline as of Fall 2014 1/6/2019 12:28 AM Approved New Course (First Version) CS 50A Course Outline as of Fall 2014 CATALOG INFORMATION Dept and Nbr: CS 50A Title: WEB DEVELOPMENT 1 Full Title: Web Development 1 Last Reviewed:

More information

Outline. Introducing Form. Introducing Forms 2/21/2013 INTRODUCTION TO WEB DEVELOPMENT AND HTML

Outline. Introducing Form. Introducing Forms 2/21/2013 INTRODUCTION TO WEB DEVELOPMENT AND HTML Outline INTRODUCTION TO WEB DEVELOPMENT AND HTML Introducing Forms The element Focus Sending form data to the server Exercise Lecture 07: Forms - Spring 2013 Introducing Form Any form is declared

More information

Welcome. Web Authoring: HTML - Advanced Topics & Photo Optimisation (Level 3) Richard Hey & Barny Baggs

Welcome. Web Authoring: HTML - Advanced Topics & Photo Optimisation (Level 3) Richard Hey & Barny Baggs Welcome Web Authoring: HTML - Advanced Topics & Photo Optimisation (Level 3) Richard Hey & Barny Baggs Health and Safety Course Information General Information Objectives To understand the need for photo

More information

Markup Language. Made up of elements Elements create a document tree

Markup Language. Made up of elements Elements create a document tree Patrick Behr Markup Language HTML is a markup language HTML markup instructs browsers how to display the content Provides structure and meaning to the content Does not (should not) describe how

More information

Figure 1 Forms category in the Insert panel. You set up a form by inserting it and configuring options through the Properties panel.

Figure 1 Forms category in the Insert panel. You set up a form by inserting it and configuring options through the Properties panel. Adobe Dreamweaver CS6 Project 3 guide How to create forms You can use forms to interact with or gather information from site visitors. With forms, visitors can provide feedback, sign a guest book, take

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

CIW EXAM - 1D CIW JavaScript Specialist. Buy Full Product.

CIW EXAM - 1D CIW JavaScript Specialist. Buy Full Product. CIW EXAM - 1D0-435 CIW JavaScript Specialist Buy Full Product http://www.examskey.com/1d0-435.html Examskey CIW 1D0-435 exam demo product is here for you to test the quality of the product. This CIW 1D0-435

More information

CSC309 Tutorial CSS & XHTML

CSC309 Tutorial CSS & XHTML CSC309 Tutorial CSS & XHTML Lei Jiang January 27, 2003 1 CSS CSC309 Tutorial --CSS & XHTML 2 Sampel XML Document

More information