Lecture # 32.1 Lab 10: Server 1. Lab 10 Server 1 Add and delete names.

Slides:



Advertisements
Similar presentations
Dreamweaver Forms Overview. Forms – A Little Review Most user/webpage communication is one way, like this: Most user/webpage communication is one way,
Advertisements

Building the e-Zine. The e-Zine is in the form of a Website and must contain the following: Several pages, which must be linked, including an Information.
Java Script Session1 INTRODUCTION.
The Librarian Web Page Carol Wolf CS396X. Create new controller  To create a new controller that can manage more than just books, type ruby script/generate.
Project 8 Creating Style Sheets.
Introduction to PHP MIS 3501, Fall 2014 Jeremy Shafer
CIS101 Introduction to Computing Week 08. Agenda Your questions JavaScript text Resume project HTML Project Six This week online Next class.
Create internal and external links Create internal links to named anchors Insert Flash Text Create, modify, and copy navigation bar Manage Web site links.
Multiple Tiers in Action
1 Computing for Todays Lecture 22 Yumei Huo Fall 2006.
Microsoft Excel Integration Project Linking an Excel Worksheet to a Word Document and Web Discussions.
Python and Web Programming
Creating & Attaching CSS An CSS Primer Tutorial. A New CSS Document Create a new CSS Document in Dreamweaver using the “New” option under the File Menu.
Creating First Class Web Pages Log into your account.
A02 Creating my website NAME ______________. UNIT 2 – A02 – Creating my Website The purpose of this assessment objective is to create 5 web pages containing.
CGI Programming: Part 1. What is CGI? CGI = Common Gateway Interface Provides a standardized way for web browsers to: –Call programs on a server. –Pass.
PHP and SQL Server: Queries IST2101. Project Report 4 SQL Queries Due Sunday, 4/5 at 11:59pm Instructions on how to access team webspace and SQL database.
1 PHP and MySQL. 2 Topics  Querying Data with PHP  User-Driven Querying  Writing Data with PHP and MySQL PHP and MySQL.
Lecture # 29 Python III: Client  Server. Motivation: How the Internet Works Static HTML Pages ApacheApache ApacheApache BrowserBrowser BrowserBrowser.
Views Carol Wolf Computer Science. Extended Ruby  Views files are written in extended Ruby, erb.  They end in.html.erb.  Ruby code is intermixed with.
CSCI 6962: Server-side Design and Programming Introduction to Java Server Faces.
Lecture # 6 Forms, Widgets and Event Handling. Today Questions: From notes/reading/life? Share Personal Web Page (if not too personal) 1.Introduce: How.
Java CGI Lecture notes by Theodoros Anagnostopoulos.
Fall 2005 Using FrontPage to Enhance Blackboard - Darek Sady1 Using FrontPage to Enhance Blackboard 1.Introduction 2.Starting FrontPage 3.Creating Documents.
LAUNCH BUTTON Data Images Executable programs Music Etc. Files have a name and an extension – Filename.ext You assign the file name, the application.
Introduction to Enterprise Guide Jennifer Schmidt Rhonda Ellis Cassandra Hall.
Creating Links. The Anchor Element: The anchor tag can be used in three different ways: 1.External link – to link to a web page outside your own website.
Videos. Adding Videos to a Web Page Videos can make our pages more interesting and engaging. Most video-hosting services, such as YouTube, will provide.
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.
ECA 225 Applied Interactive Programming1 ECA 225 Applied Online Programming basics.
הרצאה 4. עיבוד של דף אינטרנט דינמי מתוך Murach’s PHP and MySQL by Joel Murach and Ray Harris.  דף אינטרנט דינמי משתנה עפ " י הרצת קוד על השרת, יכול להשתנות.
OLE Slide No. 1 Object Linking and Embedding H OLE H definition H add other information to documents H copy.
Create the cover page by inserting clip art, WordArt, and text. Triple-click and enter your name here. Do not press the delete key! Triple-click and enter.
® IBM Software Group © 2006 IBM Corporation JSF Rich Text Area Component This Learning Module describes the use of the JSF Rich Text Area component – for.
Web Authoring with Dreamweaver. Unit Objectives  Be able to define keywords: HTML, HTTP (protocol), browser, web server, client/server, tag, attribute,
Introducing Dreamweaver. Dreamweaver The web development application used to create web pages Part of the Adobe creative suite.
1 After completing this lesson, you will be able to: Open a file. Navigate through a document. Scroll through a document. Insert text in a document. Select.
1 After completing this lesson, you will be able to: Create a form using AutoForm. Create a form using the Form Wizard. Add controls to a form. Modify.
IS2803 Developing Multimedia Applications for Business (Part 2) Lecture 2: Introduction to IS2803 Rob Gleasure
Random Name Picker. Instructions 1.Either enter a list of new names or load a set previously saved names by clicking the load button. 2.Click start. Known.
Database to HTML and Back again A programmers tale.
JavaScript 101 Lesson 6: Introduction to Functions.
Python: File Directories What is a directory? A hierarchical file system that contains folders and files. Directory (root folder) Sub-directory (folder.
Lessons Copy and Paste Text Drag and Drop Text 2-Saving Documents 3- Printing 4-Inserting Tables Modifying Page Layout Format Page Margins Insert a Blank.
1 How to Publish Your HTML Page on the Web. Every USF Student has a website 2 Your Net ID You have a directory on the server.
COM621: Advanced Interactive Web Development Lecture 10 PHP and MySQL.
Client-side (JavaScript) Validation. Associating a function with a click event – Part 1 Use the input tag’s onclick attribute to associate a function.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 11 Creating Web Applications and Writing Data to a Database.
Section 10.1 Define scripting
Creating Data Base & Sql Data Source
Introduction to Programming
Database application MySQL Database and PhpMyAdmin
>> PHP: HTML Integration
Intro to PHP & Variables
File Handling Programming Guides.
Introduction to Programming
Use proper case (ie Caps for the beginnings of words)
Introduction to Programming
Accessing Databases with ADO.NET, Handling Exceptions, and Printing
Creating Data Base & Sql Data Source
Directions slide: 1. Complete the title slide.
YOUR text YOUR text YOUR text YOUR text
Grauer and Barber Series Microsoft Access Chapter One
Introduction to Programming
Directions slide: 1. Complete the title slide.
A02 Creating my website NAME ______________.
Introduction to Programming
ExamView Pro ADMINISTERING TESTS.
Directions slide: 1. Complete the title slide.
Presentation transcript:

Lecture # 32.1 Lab 10: Server 1

Lab 10 Server 1 Add and delete names

Lab 10 Server 1 from a pull-down/select list

Lab 10 Server 1 and store them in a name database: Server Name Database

Lab 10 Server 1 DEMO

Here are the Steps A through G: A.Modify the HTML File: MyFamilyHistory.html B.Set Up the cgi file C.Set Up the Database D.Making life easier (use a “dictionary”) E.Processing the Form (write python functions) F.Modify the generateHTMLPage function G.Test it and Link it Up

Here are the Steps A through G: A.Modify the HTML File: MyFamilyHistory.html B.Set Up the cgi file C.Set Up the Database D.Making life easier (use a “dictionary”) E.Processing the Form (write python functions) F.Modify the generateHTMLPage function G.Test it and Link it Up

A: Modify the HTML File: MyFamilyHistory.html 1. 1.Set the action attribute in to: 1.Name all necessary widgets. For example 1.Insert the list of people (string %listOfPeople%) Copy MyFamilyHistory.html HTML_CS S Server1 YourAccountName

Here are the Steps A through G: A.Modify the HTML File: MyFamilyHistory.html B.Set Up the cgi file C.Set Up the Database D.Making life easier (use a “dictionary”) E.Processing the Form (write python functions) F.Modify the generateHTMLPage function G.Test it and Link it Up

B: Set up the cgi file Copy the MFH.cgi file from HTML_CSS folder to the Server1 folder Copy MFH.html HTML_CS S Server1

Here are the Steps A through G: A.Modify the HTML File: MyFamilyHistory.html B.Set Up the cgi file C.Set Up the Database D.Making life easier (use a “dictionary”) E.Processing the Form (write python functions) F.Modify the generateHTMLPage function G.Test it and Link it Up

C: Set up the Database – Step 1 1. Modify initializeWithNames.py so that it has your names Run createDB.py and initializeWithNames.py by double clicking on them, in that order Copy createDB.py HTML_CS S Server1 initializeWithNames.py

C: Set up the Database – Step 2 2.Modify MFH.cgi to include theses four lines at the end: openDB() {Opens External DB; copies names to Internal DB} processForm() {Adds/Deletes names to/from Internal DB} print generateHTMLPage(variables) {Generates new html page to be sent back to Client} closeDB() {Copies names from Internal DB to External DB} Add the following python constructs for the Internal DB: names = [] {[] defines names as an empty list} mothers = {} {{} declare mothers and fathers as fathers = {} empty dictionaries}

C: Set up the Database – Step 3 3. Modify MFH.cgi to read and write from the database: Insert the line “import squlite3” Insert the functions openDB() and closeDB():

Here are the Steps A through G: A.Modify the HTML File: MyFamilyHistory.html B.Set Up the cgi file C.Set Up the Database D.Making life easier (use a “dictionary”) E.Processing the Form (write python functions) F.Modify the generateHTMLPage function G.Test it and Link it Up

D: Making life easier (use a dictionary) Organize the keywords with the text that is to replace the keywords in the html document using a dictionary. To define and initialize this dictionary put the following in the cgi file right after the cgitb.enable() statement: variables ={"%newName%": "", "%errorMessageArea%": "", "%listOfPeople%": "”}

Here are the Steps A through G: A.Modify the HTML File: MyFamilyHistory.html B.Set Up the cgi file C.Set Up the Database D.Making life easier (use a “dictionary”) E.Processing the Form (write python functions) F.Modify the generateHTMLPage function G.Test it and Link it Up

E: Processing the Form – Step 1 1. Create the processForm() function called by the main routine and insert it after the openDB() function

E: Processing the Form – Step 2 2. Create the addPerson() function called by the function processForm() function

E: Processing the Form – Step 3 3. Create the deleteSelectedPerson() function called by the function processForm() :

E: Processing the Form – Step 4 4. Create the createListOfPeople() function called by the function processForm() :

Here are the Steps A through G: A.Modify the HTML File: MyFamilyHistory.html B.Set Up the cgi file C.Set Up the Database D.Making life easier (use a “dictionary”) E.Processing the Form (write python functions) F.Modify the generateHTMLPage function G.Test it and Link it Up

F: Modify the generateHTMLPage function Modify the generateHTMLPage() function to replace the keywords %newName%, %errorMessageArea% and %listOfPeople% in the html document with the corresponding values in the dictionary in variables. Do this using the replace method:

Here are the Steps A through G: A.Modify the HTML File: MyFamilyHistory.html B.Set Up the cgi file C.Set Up the Database D.Making life easier (use a “dictionary”) E.Processing the Form (write python functions) F.Modify the generateHTMLPage function G.Test it and Link it Up

G: Test it and link it up Make sure the “Add Person” and the “Delete Person” buttons work. Also make sure that a list of names now appears in the selection list.