HTML5 Demo ISYS 350.

Slides:



Advertisements
Similar presentations
Ch3: Introduction to HTML5 part 2 Dr. Abdullah Almutairi ISC 340 Fall 2014.
Advertisements

HTML5 Demo ISYS 350. HTML 5 validation/#.UdytIOLn_zc validation/#.UdytIOLn_zc.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 9 Key Concepts 1 Copyright © Terry Felke-Morris.
Chapter 10 Form Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
Web Page Introduction. What is a web page? A web page is a text file containing markup language tags. –A markup language combines text and extra information.
Mark Branom, Continuing Studies.  HTML5 overview – what’s new?  New HTML5 elements  New HTML5 features  Guided Demonstrations  Forms  Video  Geolocation.
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
Tutorial #9 – Creating Forms. Tutorial #8 Review – Tables Borders (table, gridlines), Border-collapse: collapse; empty-cells: show; and rowspan, colspan.
Session 1 Chapter 10 - How to Work with Forms ITI 134: HTML5 Desktop and Mobile Level II
Scripting Languages.
CHAP 3. FORM API.  Forms should still be encapsulated in a element where the basic submission attributes are set.  Forms still send the values of the.
CC1003N Week 6 More CSS and Javascript.. Objectives: ● More CSS Examples ● Javascript – introduction ● Uses of Javascript ● Variables ● Comments ● Control.
Working with background, images and date object Basharat Mahmood, Department of Computer Science, CIIT, Islamabad, Pakistan 1.
Session: 10. © Aptech Ltd. 2HTML Forms / Session 10  Describe HTML5 forms  Explain the working of new input types in HTML5  Explain the new Form attributes.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 9 Key Concepts 1 Copyright © Terry Felke-Morris.
Lecture 9 The Basics of JavaScript Boriana Koleva Room: C54
HTML Forms.
Week 9 - Form Basics Key Concepts 1. 1.Describe common uses of forms on web pages 2.Create forms on web pages using the form, input, textarea, and select.
HTML Forms. Slide 2 Forms (Introduction) The purpose of input forms Organizing forms with a and Using different element types to get user input A brief.
CHAPTER 15 HTML 5 VIDEO AND AUDIO Intro to HTML5 1.
Copyright © Terry Felke-Morris HTML5: TEXT BOX Accepts text information in address format Common Attributes: ◦ type=“ ” ◦ name ◦ id ◦
RIA Geo Location. Finding Location modern devices can get location coordinates phones and tablets can use GPS desktops and laptops –often cannot use GPS.
03 – HTML (2) Informatics Department Parahyangan Catholic University.
Phonegap Bridge –Geolocation and Google maps CIS 136 Building Mobile Apps 1.
HTML5 Demo ISYS 350. HTML 5 validation/#.UdytIOLn_zc validation/#.UdytIOLn_zc.
Session I How to Work with Forms Chapter 11 - How to Work with Formswww.profburnett.com.
XHTML Forms.
Working with Date ISYS 350.
Java Script Date Object
JavaScript.
HTML 5.
>> Introduction to HTML: Forms
CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr
© 2017 Akhilesh Bajaj, All Rights Reserved
EXCEPTION HANDLING IN SERVER CLIENT PROGRAMMING
Key concepts of Computing
Principles of Software Development
The Document Object Model (DOM) is a W3C standard.
HTML5 Demo ISYS 350.
Java String and Date ISYS 350.
WHY FORMS? Explain: Mostly, when you need to collect data from a user you need a form Click: Google search form Click: Facebook login form Click:
Java Script.
Geolocation using Google maps
IS333: MULTI-TIER APPLICATION DEVELOPMENT
Web Development & Design Foundations with HTML5 8th Edition
Java Date ISYS 350.
Objectives Explore web forms Work with form servers
HTML5 Geolocation 11/12/2018 Copyright © Carl M. Burnett.
BY: SITI NURBAYA ISMAIL FACULTY of COMPUTER and MATHEMATICAL SCIENCES
Geolocation using Google maps
HTML Level II (CyberAdvantage)
Session V HTML5 APIs - HTML5 Geolocation
Forms Data Entry and Capture
JavaScript Forms Adding User Input.
HTML5 Level II Session III
The University of Tulsa
New Form Input Types.
HTML5 Demo ISYS 350.
Session IV Chapter 10 – How to Work with Forms and Data Validation
HTML5 Demo ISYS 350.
Java Date ISYS 350.
HTML5 Demo ISYS 350.
HTML5 Form Types – Newer Available Fields
Basics of Web Design Chapter 10 Form Basics Key Concepts
Java Date ISYS 350.
HTML5 Demo ISYS 350.
Session III Chapter 10 – How to Work with Forms and Data Validation
Kanida Sinmai HTML Form Kanida Sinmai
Geolocation using Google maps
Java Date ISYS 350.
Presentation transcript:

HTML5 Demo ISYS 350

HTML 5 http://www.the-art-of-web.com/html/html5-form-validation/#.UdytIOLn_zc http://diveintohtml5.info/forms.html https://www.w3schools.com/html/html5_intro.asp

New INPUT types http://www. w3schools. com/html/html_form_input_types INPUT type="number" :will check for digits only INPUT type="range” INPUT type=“date” : show a date picker Other types: email, url, tel, etc Age: <input type="number" size="6" name="age" min="18" max="99" value="21"><br> Satisfaction: <input type="range" size="2" name="satisfaction" min="1" max="5" value="3">

'required' attribute Example: Your Name: <input type="text" name="name" required>

‘placeholder’ Attribute Placeholder attribute which lets us display a prompt or instructions inside the field. Example: Email Address: <input type="email" name="email" required placeholder="Enter a valid email address">

HTML 5 Form Demo <form> Your Name: <input type="text" name="name" required><br> Email Address: <input type="email" name="email" required placeholder="Enter a valid email address"><br> Website: <input type="url" name="website" required pattern="https?://.+"><br> Age: <input type="number" size="6" name="age" min="18" max="99" value="21"><br> Satisfaction: <input type="range" size="2" name="satisfaction" min="1" max="5" value="3"><br><br> <input type="submit" value="Submit" name="btnSubmit" /> </form>

Date Control <script> function showDate() { alert(document.getElementById("bday").value); } </script> <body> <h1>Show a date control:</h1> <form> Birthday: <input type="date" id="bday" name="bday"> <input type="button" value="Show Date" onclick="showDate()"> </form>

JavaScript Date Objects https://www.w3schools.com/js/js_dates.asp Creating Date Objects new Date(): creates a new date object with the current date and time Ex. currentDate=new Date; new Date(date string) Ex. myDate=alert(document.getElementById("bday").value; new Date(milliseconds):JavaScript stores dates as number of milliseconds since January 01, 1970, 00:00:00 new Date(year, month, day, hours, minutes, seconds, milliseconds)

Defining Objects <script> function showDate() { alert(document.getElementById("bday").value); myDate=new Date(document.getElementById("bday").value);alert(myDate.toString()); alert(myDate.toString()); currentDate=new Date(); alert(currentDate.toString()); } </script> <body> <h1>Show a date control:</h1> <form> Birthday: <input type="date" id="bday" name="bday"> <input type="button" value="Show Date" onclick="showDate()"> </form>

Date Methods getFullYear() Get the year as a four digit number (yyyy) getMonth() Get the month as a number (0-11) getDate() Get the day as a number (1-31) getHours() Get the hour (0-23) getTime() Get the time (milliseconds since January 1, 1970) getDay() Get the weekday as a number (0-6)

Date Methods Demo Days to July 4th (days between 2 dates) <script> function showDate() { myDate=new Date(document.getElementById("date").value); currentDate=new Date(); daysToJuly4th=(myDate.getTime()-currentDate.getTime())/(24*60*60*1000); alert(daysToJuly4th.toFixed(2) + " days to July 4th"); } </script> <body> <h1>Show a date control:</h1> <form> Birthday: <input type="date" id="date" name="bday"> <input type="button" value="Show Date" onclick="showDate()"> </form>

How old are you? <script> function showDate() { myDate=new Date(document.getElementById("date").value); currentDate=new Date(); yourAge=(currentDate.getTime()-myDate.getTime())/(365*24*60*60*1000); alert("You are: "+yourAge.toFixed(2) + " years old!"); yourAge=currentDate.getFullYear()-myDate.getFullYear(); } </script> <body> <h1>Show a date control:</h1> <form> Birthday: <input type="date" id="date" name="bday"> <input type="button" value="Show Date" onclick="showDate()"> </form>

HTML 5 Form fieldset https://24ways Like a GroupBox http://www.w3schools.com/tags/tag_fieldset.asp Try It Yourself

HTML5 Multimedia: Video,Audio,Youtube,Etc. http://www. w3schools

Adding New Elements to HTML http://www. w3schools <head> <title>Creating an HTML Element</title> <script>document.createElement("myHero")</script> <style> myHero { display: block; background-color: #ddd; padding: 50px; font-size: 30px; } </style> </head> <body> <myHero>My First Hero</myHero> </body>

HTML5 Geolocation Demo: http://www. w3schools The navigator.geolocation.getCurrentPosition() method returns an object with latitude, longitude and other properties. Latitude Logitude Static map

HTML5 Geolocation Demo <script> var x; function getLocation() { x = document.getElementById("demo"); if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(showPosition); } else { x.innerHTML = "Geolocation is not supported by this browser."; } function showPosition(position) { x.innerHTML = "Latitude: " + position.coords.latitude + "<br>Longitude: " + position.coords.longitude; </script> </head> <body> <p>Click the button to get your coordinates.</p> <button onclick="getLocation()">Try It</button> <p id="demo"></p>

Displaying the Result in a Map Demo: https://www. w3schools

Google Maps https://www.w3schools.com/graphics/google_maps_intro.asp Maps basic Maps overlays