Logins  You will need PHP to test this code, all modern web hosting companies will provide this, Lehigh does not.  I've given you an account on des170.com:

Slides:



Advertisements
Similar presentations
JQuery MessageBoard. Lets use jQuery and AJAX in combination with a database to update and retrieve information without refreshing the page. Here we will.
Advertisements

WEB DESIGN TABLES, PAGE LAYOUT AND FORMS. Page Layout Page Layout is an important part of web design Why do you think your page layout is important?
Using Outlook Benefits of Using Outlook Now – Better formatting of HTML mail (with bullets, fonts, etc.) – Great calendar, ability to send meeting.
The Way to Success … Sta rt Sta rt Ak Technologies Mo | Visit.
Form Validation. Learning Objectives By the end of this lecture, you should be able to: – Describe what is meant by ‘form validation’ – Understand why.
( ) Basics Apr 2011 Public Computer Center Moore Memorial Library | Greene, NY.
Chapter 6 Basic forms 1. Forms and query string 2 form : a group of user input (UI) controls that accepts information from the user and sends the information.
Basic Calendar Something that would make your web page look very nice is a basic calendar. A basic calendar shows the currents days of the month. This.
>> PHP: JS Integration & s. function validate() { } Inserting / Uploading Items to DB Web-Based Systems - Misbhauddin type=“submit” 2 1.
How to Establish a Blog. What is a Blog A blog is a collection of informational articles/ideas intended to update a viewer on new information associated.
Cooperating Teachers: How to Reset Your Password in Tk20 Use this after your initial account set up if you cannot remember your TK20 password.
Training for ESF Schools Website 7. NEWSLETTER. Training for ESF Schools Website Create Newsletter Issue 1 To create Newsletter Issue, click on ‘Create.
Setting up in Outlook Express. Select “Tools” from the toolbar menu.
Microsoft ® Office Word 2007 Training Mail Merge II: Use the Ribbon and perform a complex mail merge [Your company name] presents:
Free Powerpoint Templates Page 1 MICROSOFT OFFICE OUTLOOK 2007 PRESENTED BY: BRANDO P. DUMALI.
. If the PHP server is an server or is aware of which server is the server, then one can write code that s information. –For example,
Logins  You will need PHP to test this code, all modern web hosting companies will provide this, Lehigh does not.  I've given you an account on des170.com:
Club/Student Mobile Device Syncing Last updated : 28 May 2014.
Agenda What is AJAX? What is jQuery? Demonstration/Tutorial Resources Q&A.
Chapter 9 Collecting Data with Forms. A form on a web page consists of form objects such as text boxes or radio buttons into which users type information.
JavaScript Form Validation
Week 4  Using PHP with HTML forms  Form Validation  Create your own Contact form Please Visit:
(c) Manzur Ashraf, Short course, KFUPM PHP & MySQL 1 Basic PHP Class 2.
HTML Forms What is a form.
Lecture 6 – Form processing (Part 1) SFDV3011 – Advanced Web Development 1.
Interface components is a term for all the supporting elements of a page’s content. Lists Menus Forms Tables This chapter focuses on using proper, valid.
Department of Information Technology e-Michigan Web Development 0 HTML Form Creation in the Vignette Content Management Application.
Lecture 7 – Form processing (Part 2) SFDV3011 – Advanced Web Development 1.
The Pendulum Have you forgotten your password? Your One-stop Online Writers’ Hub.
Project Four Forms Discuss form processing Describe the difference between client-side and server-side form processing Add a horizontal rule to a Web page.
CSCI 6962: Server-side Design and Programming Introduction to AJAX.
Homework for October 2011 Nikolay Kostov Telerik Corporation
Let’s Make An Form! Bonney Armstrong GD 444 Westwood College February 9, 2005.
Introduction.  What does this course mean to VGP?  Creating persistent worlds  Offline multiplayer games  Save/retrieve data from the Web  What does.
Online Reporting Guide
Creating Web Documents XHTML Project II topics should be posted Start Forms Homework: Forms not required for midterm or project 2. At some point, read.
Once you have contacted me to set up a new account, your computer needs to be configured to dial into.DevlinEx and use our servers for things like .
December 2010Brad Hudson AO3 Homework Task > All you need to know about sending s.
A little PHP. Enter the simple HTML code seen below.
Encryption Cisco Ironport using Click here to begin Press the ‘F5’ Key to Begin.
G053 - Lecture 16 Validating Forms Mr C Johnston ICT Teacher
System Initialization 1)User starts application. 2)Client loads settings. 3)Client loads contact address book. 4)Client displays contact list. 5)Client.
Regional School District 10 Outlook Web Application (OWA)
Chapter 6: Authentications. Training Course, CS, NCTU 2 Overview  Getting Username and Password  Verifying Username and Password  Keeping The Verification.
Introduction to HTML. What is HTML?  Hyper Text Markup Language  Not a programming language but a markup language  Used for presentation and layout.
Forms and Server Side Includes. What are Forms? Forms are used to get user input We’ve all used them before. For example, ever had to sign up for courses.
LOGO FORMs in HTML CHAPTER 5 Eastern Mediterranean University School of Computing and Technology Department of Information Technology ITEC229 Client-Side.
Creating Databases CSS example. One-way encryption. Passwords. Security issues. Work session.. Homework: Making unique posting on encryption, passwords,
Saving Form Data You can save form data in Google Spreadsheets using the following steps. 1.Create a Google Spreadsheet in your documents 2.Use Tools to.
Topics Sending an Multipart message Storing images Getting confirmation Session tracking using PHP Graphics Input Validators Cookies.
ITM © Port, Kazman1 ITM 352 More on Forms Processing.
IS-907 Java EE World Wide Web - Overview. World Wide Web - History Tim Berners-Lee, CERN, 1990 Enable researchers to share information: Remote Access.
OFFICE OF INFORMATION TECHNOLOGY Frevvo Training MIDDLEWARE AND HIGH PERFORMANCE COMPUTING OFFICE OF INFORMATION TECHNOLOGY, ENTERPRISE SYSTEMS FLORIDA.
Web Technologies Lecture 3 Web forms. HTML5 forms A component of a webpage that has form controls – Text fields – Buttons – Checkboxes – Range controls.
2014 Silver Award Recipient AHA/HRET HEN Hospital Collaborative LISTSERV® Subscriber’s Tutorial.
Computer Information Technology. I need you to submit your project electronically to the Hancock website. Before you can submit your project you will.
Introduction to Your OUSD and other district technology applications Leah Jensen, Instructional Technologist (510) (office), (510)
Web Authoring with Dreamweaver. Unit Objectives  Be able to define keywords: HTML, HTTP (protocol), browser, web server, client/server, tag, attribute,

Learning Aim C.  In this section we will look at how text, tables, forms and frames can be used in web pages.
INTERNET APPLICATIONS CPIT405 Forms, Internal links, meta tags, search engine friendly websites.
How to configure webmail with gmail- Step by Step guide provided by web hosting company in India Call us
A little PHP. Enter the simple HTML code seen below.
A little PHP.
Jkelany Chat Project.
EXCEPTION HANDLING IN SERVER CLIENT PROGRAMMING
Web Programming– UFCFB Lecture 17
Unit 27 - Web Server Scripting
C++ Final Presentation.
Presentation transcript:

Logins  You will need PHP to test this code, all modern web hosting companies will provide this, Lehigh does not.  I've given you an account on des170.com:  SFTP server: des170.com  Login:  Password:  Directory: web

Standard FormsStandard Forms  DW: insert> forms> form  Insert > form > Text field, text area, checkbox, radio button, select  Button  Standard Code

Code from last semester…Code from last semester… mail Subject: Message: ---- save as mail.php in same directory, change $to line <?php $to = $ = $_REQUEST[' '] ; $subject = $_REQUEST['subject'] ; $message = $_REQUEST['message'] ; mail( $to, "Subject: $subject", $message, "From: $ " ); header( 'Location: thanks.html' ); ?>

Classic Form Processing Model  Web Application Development

AJAX  Asynchronous Javascript and XML  Except, xml isn’t cool anymore, it’s now trendy to use JSON to transfer data (JavaScript Object Notation)  “Data side” of the jQuery code we have been working with …  Pros/Cons

AJAX Form ProcessingAJAX Form Processing Still need the HTML, PHP (slightly modified), and some javascript… messageHandler.php: <?php $username = $_POST['username']; $phoneNumber = $_POST['phoneNumber']; $message = $_POST['message']; $ = $_POST[' ']; // setup the mail headers $subject = 'New contact received through the website'; $to = // <-- put YOUR address here. $from = $ ; $headers = "From: $from". "\r\n". "Reply-to: $from". "\r\n". 'X-Mailer: PHP/'. phpversion(); $body = "New received, details below\n\n"; $body.= "Full name: $username\n"; $body.= " address: $ \n"; $body.= "Phone number: $phoneNumber\n"; $body.= " \n"; $body.= $message; //echo 'hello'; if (mail($to,$subject,$body,$headers)) { $returnMessage = "Thank you $username, we have received your message and reply to you as soon as possible."; $response = array('status'=>'success','message'=>$returnMessage); } else { $response = array('status'=>'error'); } header('HTTP/ OK'); echo json_encode($response); ?>

HTML part 1HTML part 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " Contact Form body { font-family: verdana; font-size:12px; } #container { margin:20px 20px 0px 20px; } #statusUpdate { margin-top:20px; border:1px solid #999; padding:10px; width:300px; color:#666; display:none; } #contactForm label { color:red; display:block; }

HTML part 2HTML part 2 Contact Me Full Name: Your Address: Phone Number: Your inquiry:

The JavascriptThe Javascript jQuery(document).ready(function() { jQuery('#submitButton').click(function() { var theName = jQuery('#theName').val(); var theNumber = jQuery('#theNumber').val(); var theMessage = jQuery('#theMessage').val(); var the = jQuery("#the ").val(); jQuery.post("messageHandler.php", { username: theName, phoneNumber: theNumber, message: theMessage, the }, function(data) { if (data.status == 'success') { jQuery("#statusUpdate").html(data.message); jQuery("#statusUpdate").fadeIn(500); } else { jQuery("#statusUpdate").css('color','#ff0000'); jQuery("#statusUpdate").html('Sorry, there was an error sending you message.'); jQuery("#statusUpdate").fadeIn(500); } },"json" ); });

Validdation  Almost always done client side (perhaps also server side), with javascript  jQuery simplifies this tedious task  Example: if (theName == '') { jQuery("#theName").after(' Please fill in your first name. '); jQuery("#theName").focus(); return false; }

All ValidationAll Validation  Add before messageHandler post in the javascript – check for errors before data is sent // remove any error messages jQuery("#contactForm").find('label').remove(); // first validate the form var dotpos=the .lastIndexOf("."); if (apos < 1 || dotpos-apos < 2 ) { // address lacks an symbol or a '.' jQuery("#the ").after(' Please enter a valid address. '); jQuery("#the ").focus(); return false; } if (theName == '') { jQuery("#theName").after(' Please fill in your first name. '); jQuery("#theName").focus(); return false; } if (theNumber == '') { jQuery("#theNumber").after(' Please fill in your phone number. '); jQuery("#theNumber").focus(); return false; } if (theMessage == '') { jQuery("#theMessage").after(' Please enter a message. '); jQuery("#theMessage").focus(); return false; }

Homework  Research form stylizing CSS (customizing the look, color, focus css form forms) – try to make something unusual.  Forms can be beautiful:  Create a contact form that has additional fields than what was shown in this demo, at least 3 additional fields (try to use more than just standard text boxes)  Create a beautiful stylized form (perhaps the look of your portfolio layout), with validation, that sends a formatted .  Nov 1,3 – work time. Due Nov 8. Must post on des170.com because you cannot use ajax between domains. link.