Suzanne J. Sultan Javascript Lecture 2. Suzanne J. Sultan function What is a function> Types of functions:  Function with no parameters  Function with.

Slides:



Advertisements
Similar presentations
HTML Forms. collect information for passing to server- side processes built up from standard widgets –text-input, radio buttons, check boxes, option lists,
Advertisements

23-Aug-14 HTML/XHTML Forms. 2 What are forms? is just another kind of XHTML/HTML tag Forms are used to create (rather primitive) GUIs on Web pages Usually.
24-Aug-14 HTML Forms. 2 What are forms? is just another kind of HTML tag HTML forms are used to create (rather primitive) GUIs on Web pages Usually the.
Hyperlink & Form Pertemuan 11 Matakuliah: L0182 / Web & Animation Design Tahun: 2008.
1 Introduction to HTML II อุทัย เซี่ยงเจ็น สำนักวิชาเทคโนโลยีสารสนเทศ และการสื่อสาร มหาวิทยาลัยนเรศวร พะเยา.
Images, Tables, lists, blocks, layout, forms, iframes
FORMs Lesson TBE 540. Prerequisites Before beginning this lesson, the learner must be able to… –Create basic web pages using a text editor and/or a web.
Supplement Creating Forms. Objectives Show how forms are used How to create the Form element HTML elements used for creating input fields.
Forms cs105. More Interactive web-pages So far what we have seen was to present the information. (Ex: tables. Lists,….). But it is not enough. We want.
Forms Review. 2 Using Forms tag  Contains the form elements on a web page  Container tag tag  Configures a variety of form elements including text.
Computing Concepts Advanced HTML: Tables and Forms.
Form Basics CS Web Data  Most interesting web pages revolve around data  examples: Google, IMDB, Digg, Facebook, YouTube, Rotten Tomatoes  can.
Forms. Form An HTML form is a section of a document containing normal content, special elements called controls (checkboxes, radio buttons, buttons, etc.),
ECA 228 Internet/Intranet Design I Forms. ECA 228 Internet/Intranet Design I Forms forms are a way for a user to communicate with you – text fields –
HTML F ORMS. F ORMS HTML forms are used to pass data to a server. An HTML form can contain input elements like text fields, checkboxes, radio-buttons,
Tutorial #9 – Creating Forms. Tutorial #8 Review – Tables Borders (table, gridlines), Border-collapse: collapse; empty-cells: show; and rowspan, colspan.
4-Sep-15 HTML Forms Mrs. Goins Web Design Class. Parts of a Web Form A Form is an area that can contain Form Control/Elements. Each piece of information.
HTML Forms What is a form.
CO1552 Web Application Development HTML Forms. Websites can be made more interactive by providing facilities for users to provide data To get user entered.
Forms and Form Controls Chapter What is a Form?
CSE 382/ETE 334 Internet and Web Technology Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU.
DAT602 Database Application Development Lecture 14 HTML.
1 Forms A form is the usual way that information is gotten from a browser to a server –HTML has tags to create a collection of objects that implement this.
Chapter 5 Java Script And Forms JavaScript, Third Edition.
Forms Sangeetha Parthasarathy 02/05/2001. Introduction to Forms A form makes it possible to transform your web pages from text to graphics to interactive.
Robinson_CIS_285_2005 HTML FORMS CIS 285 Winter_2005 Instructor: Mary Robinson.
LOGO FORMs in HTML CHAPTER 5 Eastern Mediterranean University School of Computing and Technology Department of Information Technology ITEC229 Client-Side.
IDK0040 Võrgurakendused I harjutus 05: Forms Deniss Kumlander.
HTML : Forms, Frames Instructor: Mr. Ahmed Al Astal ITGD4104 Department Requirement for senior student University of Palestine Faculty of IT.
HTML and FORMS.  A form is an area that can contain form elements.  Form elements are elements that allow the user to enter information (like text fields,
HTML FORMS GET/POST METHODS. HTML FORMS HTML Forms HTML forms are used to pass data to a server. A form can contain input elements like text fields, checkboxes,
HTML Forms A Preliminary Step into Dynamic Web Fred Durao
TJ 3043 – Web Application Development HTML Form. 2.0 Forms A form is the usual way to communicate information from a Web browser to a server HTML has.
1 Form Elements  Form elements have properties: Text boxes, Password boxes, Checkboxes, Option(Radio) buttons, Submit, Reset, File, Hidden and Image.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 9 Key Concepts 1 Copyright © Terry Felke-Morris.
Microsoft FrontPage 2003 Illustrated Complete Creating a Form.
HTML Form Widgets. Review: HTML Forms HTML forms are used to create web pages that accept user input Forms allow the user to communicate information back.
IS2802 Introduction to Multimedia Applications for Business Lecture 5: JavaScript, form validation and browser detection Rob Gleasure
HTML Forms a form is a container for input elements on a web page input elements contain data that is sent to the web server for processing.
Forms Collecting Data CSS Class 5. Forms Create a form Add text box Add labels Add check boxes and radio buttons Build a drop-down list Group drop-down.
TJ 3043 – Web Application Development HTML Form. 2.0 Forms - A form is the usual way information is gotten from a browser to a server - HTML has tags.
Introduction To HTML Form Inputs Written By George Gimian.
Intro to Forms  HTML forms are used to gather information from end-users.  A form can contain elements like radio- buttons, text fields, checkboxes,
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 9 Key Concepts 1 Copyright © Terry Felke-Morris.
+ FORMS HTML forms are used to pass data to a server. begins and ends a form Forms are made up of input elements Every input element has a name and value.
Copyright © Texas Education Agency, All rights reserved.1 Web Technologies Website Forms / Data Acquisition.
Making dynamic pages with javascript Lecture 1. Java script java versus javascript Javascript is a scripting language that will allow you to add real.
Project 6 Creating Forms on a Web Page. Objectives Define terms related to forms Describe the different form controls and their uses Use the tag Create.
Creating Web Page Forms COE 201- Computer Proficiency.
HTML Creating Forms on a Web Page. 2 Objectives  Discuss the process of creating a form  Distinguish between data input controls and text input controls.
HTML Forms.
HTML Form. HTML forms are used to collect user input. The element defines an HTML form: Form elements are different types of input elements, checkboxes,
Week 10: HTML Forms HNDIT11062 – Web Development.
HTML Forms. A form is simply an area that can contain form fields. Form fields are objects that allow the visitor to enter information - for example text.
Copyright (c) 2004 Prentice-Hall. All rights reserved. 1 Committed to Shaping the Next Generation of IT Experts. Project 6: Creating XHTML Forms Kelly.
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
Web Forms. Web Forms: A form allows our web visitors to submit information to us. Some examples uses for forms are to let the web user contact us, fill.
HTML FORM. Form HTML Forms are used to select different kinds of user input. HTML forms are used to pass data to a server. A form can contain input elements.
Lesson 5 Introduction to HTML Forms. Lesson 5 Forms A form is an area that can contain form elements. Form elements are elements that allow the user to.
HTML Structure II (Form) WEEK 2.2. Contents Table Form.
Unit 4 Working with data. Form Element HTML forms are used to pass data to a server. A form can contain input elements like text fields, checkboxes, radio-buttons,
HTML Tables Tables are defined with the tag. A table is divided into rows (with the tag), and each row is divided into data cells (with the tag). td stands.
FORMS Explained By: Jasdeep Kaur. Lecturer, Department of Computer Application, PGG.C.G., Sector: 42, Chandigarh.
Informatics Computer School CS114 Web Publishing HTML Lesson 4.
Ashima Wadhwa Java Script And Forms. Introduction Forms: –One of the most common Web page elements used with JavaScript –Typical forms you may encounter.
2440: 141 Web Site Administration Web Forms Instructor: Joseph Nattey.
HTML Basics (Part-3).
Creating Form Elements
Forms, cont’d.
Presentation transcript:

Suzanne J. Sultan Javascript Lecture 2

Suzanne J. Sultan function What is a function> Types of functions:  Function with no parameters  Function with parameters Structure of function: function function-name( ) { // ……….. ………… } javascript Statements parameters

Suzanne J. Sultan Function without parameter Accept the user name and write welcome statement to the entered user. function showMessage ( ) { var userName = prompt(”enter",""); alert(" welcome" + userName ); } // calling click to show message

Suzanne J. Sultan Function with parameter function showmessage(name) { alert(" welcome" + name ); } click

Suzanne J. Sultan Use the same function and send the parameter JavaScript Alert Boxes function change( color) {document.bgColor=color; } Box #1 Box #2 Property of the object document

Suzanne J. Sultan Multiple parameters function box (Text, color) { document.bgColor=color; alert (Text); document.bgColor="white";} Box #1 Box #2 Note: # the same page

Suzanne J. Sultan using the "document" object's location property <!-- function demo() { document.location=" } //--> google

Suzanne J. Sultan Using Date( ) object and time function displaydate() { date = new Date(); day= date.getDay(); month=date.getMonth(); year=date.getYear(); hour=date.getHours(); alert( day +" - "+month+" - "+ year +"\n"+hour); } display date and time Exercise: Adjusting For Military Time AM- PM

Suzanne J. Sultan forms A form is an area that can contain form elements. Form elements are elements that allow the user to enter information as:  text fields,  textarea fields,  drop-down menus,  radio buttons,  checkboxes, etc.) in a form.

Cont. A form is defined with the tag.. input elements. Suzanne J. Sultan

Component of form 1- tag to enter data and do specific function  Text field  Radio buttons  Check boxes  Submit  Reset  Normal button 2- tag (drop down menu)  Drop down menu Suzanne J. Sultan

1- and text field The most used form tag is the tag. The type of input is specified with the type attribute. Text Fields  Text fields are used when you want the user to type letters, numbers, etc. in a form. Examole: First name: <input type="text" name="firstname" value=“enter here” size= 30 maxlength=30> …. First name: * the width of the text field is 20 characters by default. Suzanne J. Sultan Enter here

and Radio Buttons Radio Buttons are used when you want the user to select one of a limited number of choices. Male Female Suzanne J. Sultan Male female Write both attribute ( name –id) with the same name

and Checkboxes Checkboxes are used when you want the user to select one or more options of a limited number of choices. I have a bike: I have a car: Suzanne J. Sultan I have a bike: I have a car:

and submit 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. Username: If you type some characters in the text field above, 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. Suzanne J. Sultan submit

and reset Reset button Normal button Suzanne J. Sultan

2- tag and Drop down box your car: Volvo Saab Fiat Audi Suzanne J. Sultan

Form and javascript Enter your name into text field and alert message will be displayed “ welcome Omar” as an example. function display(c) { alert("hggfhj"+c); } Suzanne J. Sultan

Form + javascript Two buttons with label “red” and “green”, pressing button will affect background color..using function with parameter. function display(c) { document.bgColor=c; } Suzanne J. Sultan