Practice problems. 1 Draw the output for the following code. 2. Draw the output for the following code.

Size: px
Start display at page:

Download "Practice problems. 1 Draw the output for the following code. 2. Draw the output for the following code."

Transcription

1 Practice problems. 1 Draw the output for the following code. <title>form for Spring Retreat Jacket</title> <h1>company Spring Retreat<br> Jacket Order Form</h1> <h3>please fill in this form and click on Save My Preferences</h3> <form ACTION="Spring.asp" METHOD="POST"> <p>please type your gender</p> <p>( male or female ): <input TYPE="TEXT" NAME="gender" size="20" value = male ></p> <p>please type your preference of size</p> <p>( S M L XL ) : <input TYPE="TEXT" NAME="size" size="20"></p> <p>please type your preference of color</p> <p>( Argent or Azure ): <input TYPE="TEXT" NAME="color" size="20"></p> <p><input TYPE="RESET" VALUE="Start Over on This Page"><input TYPE="SUBMIT" VALUE="Save my Preferences"></p> </form> The user should enter one of the selections that appear in front of the text boxes in parenthesis. Write necessary codes to perform the following functions. a. Write JavaScript code segment to alert if the required text are not entered in the text boxes. All errors should appear on a single alert window. b. Print on an alert window the number of textboxes, checkboxes, radios, buttons, selections and total elements in the form. c. Store the number of textboxes, checkboxes, radios, buttons, selections and total number of elements in the form in a table named FormElements that contains the fields txt, chk, rad, buton, slct and total respectively. 2. Draw the output for the following code. <HTML> <HEAD> <TITLE>Check_03_Form</TITLE></HEAD><BODY> <H3>Check 03 Form</H3> Please Czech the cities you would like to visit <FORM ACTION="Check03Response.asp" METHOD=POST> <INPUT TYPE=CHECKBOX NAME="Cities" VALUE="Prg">Prague<BR> <INPUT TYPE=CHECKBOX NAME="Cities" VALUE="Cb" CHECKED>Cheb<BR> <INPUT TYPE=CHECKBOX NAME="Cities" VALUE="Kno">Kladno<BR> <INPUT TYPE=CHECKBOX NAME="Cities" VALUE="Mlda">Mlada<BR> <INPUT TYPE="SUBMIT"></FORM></BODY> </HTML> a. Answer to all questions as in question 1 above. b. Write what will be displayed on the screen for the following code if the first and third check box is selected. <HTML> <HEAD> <TITLE>Check_03_Response</TITLE></HEAD> <BODY> <H3>Check 03 Response</H3> 1

2 We will schedule your itinerary for:<br> For icitycount=1 to Request.Form("Cities").COUNT Response.Write Request.Form("Cities")(iCityCount) Response.Write " " Next </BODY> </HTML> 3. Write complete code to achieve the following functionalities: a. Screen 1 is displayed on opening a file from a browser (values shown in the text boxes are only default values). b. The user may enter a Product Price and click on the calculate button. A JavaScript function should display, in the relevant text boxes, the Total Tax (fixed 1% of Product Price), and Total Cost of Product (given by Product Price + Total Tax). Then an alert window (message: Thank you.) should appear. c. After the user clicks the OK button on the alert window, the necessary values are submitted to the server. An ASP code on the server generates screen 2. Selecting Modify Price should bring to screen 1. Selecting 1% or 2% should bring up screen 3. The values in screen 3 reflects the values entered in the Product Price text box and the calculated Total Tax (at 1% or 2% as selected) and the Total Cost by adding Product price and Total Tax. 200 Product Price 2 Total Tax 202 Total Cost of Product Calculate Select tax Option: 1% 2% Modify Price Calculate Product price: 200 Total Tax: $4.00 (at 2%) Total Cost : $204 Thank You. Screen 1 screen2 screen3 4.a. Write JavaScript code to display on the screen the number of selections made in your assignment (working with selection for multiple choices). b. Write ASP code to display the value of the second last selected checkbox (e.g. the 2 nd one if 3 checkboxes selected) in your assignment (working with checkboxes). c. Write ASP code to count the number of records in a recordset (working with database connectivity). You need to write the code for opening the recordset object. 5 Write HTML code to display the following form on your screen. The textbox size should be 80. Select * From Customer SQL QUERY Get Details Write ASP code so that it can accept SQL query entered in the text box and displays the output of any query related to the Sqlpractice database. 2

3 6. Write HTML code to display the screen with two images (MSU logo and Wissink Hall image) as below. You can get the images from the CIS homepage. Add JavaScript code so that whenever you click on the Interchange button two images will interchange their positions. 7. Answer to the questions in the box for the following code. <HTML> <HEAD> a. Write a Javascript statement, which will move the content of the first text box <TITLE>Text Object Value</TITLE> to the second text box when the button is activated. <SCRIPT LANGUAGE="JavaScript"> function interchange() {.. </SCRIPT> b. [5 points] Write a JavaScript statement which will select the checkbox. </HEAD> <BODY> <CENTER> <H4>An Interchange Example</H4> <FORM> <INPUT TYPE="text" NAME="tested1" <BR><BR> <INPUT TYPE="text" NAME="tested2" <BR><BR> <INPUT TYPE="radio" NAME="stooges" VALUE="Larry Fine" >Larry <INPUT TYPE="button" NAME="button" VALUE="move" onclick="move()"> </FORM> </CENTER> </BODY></HTML> 3

4 8. It is intended to write code for a client-server application in which the user can make choices from different capital cities and accordingly an itinerary will be confirmed. Sample examples of input and corresponding output is shown below. The HTML and corresponding ASP code for the problem is shown with some missing parameters and values. Fill in the blank for the desired output. HTML CODE <title>check Box</title> <h3>check Boxes</h3> <p>please check the cities you would like to visit </p> <form ACTION="CheckBoxResponse.asp" METHOD="POST"> <p> <input TYPE="CHECKBOX" NAME=" " VALUE=" "> <br> <input TYPE="CHECKBOX" NAME=" " VALUE=" " > <br> <input TYPE="CHECKBOX" NAME=" " VALUE=" "> <br> <input TYPE="CHECKBOX" NAME=" " VALUE=" "> <br> <input TYPE="SUBMIT"></p> </form> 4

5 ASP Code: CheckBoxResponse.asp [4 points] <title>checkbox Response</title> <h3>checkbox Response</h3> <p>we will schedule your itinerary for:<br> <ul> For icitycount=1 to Request.Form("Capcities"). Response. Write Response.Write "<BR>" Next </ul> 9. A database table contains UserId, password and a magic number for each user. To get access to a given application a user must enter correctly the UserId, Password and the magic number matching a database entry. Given are the following screen outputs in order. Page 2 appears after page 1 is submitted, page 3 appears after page 2 is submitted and page 4 appears after page 3 is submitted. The database table entry is matched with the user entries only after the user has entered the magic number on page 3. A message You are denied access or a message Welcome you to our world! is displayed on page 4 depending if a match has not been found or if a match is found. Page 1 Page 2 Enter User ID: Enter Password: Submit Submit Enter Magic No: Page 3 Submit Page 4 You are denied access. OR Welcome you to our world! 5

6 Write code for each page to obtain the above functionality. Note that you will require to pass the relevant entry values to the subsequent pages so that all entered values may be matched with the database table entry for displaying page 4 output. Follow the following instructions while writing your code. OR Use session variables to pass information from page 1 to page 2. Use cookies or hidden text to pass values from page 2 to page 3. Use cookies or hidden text to pass values from page 1 to page 2. Use session variables to pass information from page 2 to page 3. You should write complete code for each page. Major emphasis will be given on the statements correctly passing the entry values. 10. a.given the following HTML code and a related sample output screen. </HEAD> <BODY> Please enter your address and password to login to the system. <FORM ACTION = "CheckLogin.asp" METHOD="POST" > Address: <INPUT TYPE = "Text" NAME = " " SIZE = "40"><BR> Password: <INPUT TYPE = "Password" NAME = "Password" SIZE = "10"><P> <INPUT TYPE = "Checkbox" NAME = "SaveLogin"> Save Login as a Cookie?<P> <INPUT TYPE = "Submit" VALUE = "Login"> <INPUT TYPE = "RESET"> </FORM> </BODY> </HTML> Write statement(s), which may be included in the CheckLogin.asp file, to store the following values in a cookies collection (having multiple values for the same cookie name). Make a choice of your own for any missing names. a. Store the address read from the form if the save login as cookie is checked by the user. b. Store the password read from the form. c. Store the cookies for 30 days. b. Write code to include the address read from the form in 1 above in a hidden text box. 6

7 11. A database table has the following structure and details: Field Name ContactID Name State Zip Data Type Number Text Text Number Name of the database: Customer Name of the Table: Contact ContactID is the key field in the table. Write COMPLETE code pages to display the screen on the right [1 point] and to achieve the following functions when the Process button is pressed. a. The form is submitted if all of the following conditions are satisfied, otherwise relevant error messages are displayed: (use JavaScript) - there is a Contact ID entered in the text box. [1 point] - there is at least one check box checked [2 points]. b. The ContactId along with only the values of the related field names selected by the check boxes are displayed on the next screen. [3 points] Contact Query Enter Contact ID: Name State Zip Process 12. Solve the Mid term problems. 13. Solve the problems in Take Home Quiz 1 to 3 without taking help from your previous solution. 14. Practice simple code to send Practice simple codes to upload/download files. 16. Sample practice with file system objects: - Set the attribute of a file to Readonly and hidden (attribute) - Check if a file was submitted in time (date created) - Rename a file (Name) - Delete a specified file if larger than accepted size (Size, Delete) - Check if a file is of type text (Type) - Copy or Move a file from one folder to a different folder (Copy, Move) - List all the files in a folder (Files) - Rename a folder - Check if a file exist - Print the content of a text file on the screen - Find the lines in an asp code that contains the form tag. Print out the form tag and the line number in which the form tag was found. Sample solution: <title>search Files Examples</title> filename = "test.asp" ' CREATE FILE SYSTEM OBJECT AND TEXT STREAM OBJECT set fso = Server.CreateObject("Scripting.FileSystemObject") set tso = fso.opentextfile(server.mappath(filename), 1, false, 0) 7

8 ' LOOP THROUGH FILE i = 1 while not tso.atendofstream temp = tso.readline if InStr(temp, "<form") > 0 then ' FORMAT LINE FOR DISPLAY tempformat = Replace(temp, "<", "<") tempformat = Replace(tempFormat, ">", ">") ' DISPLAY LINE NUMBER AND LINE OF MATCH response.write("<br><br><br>'" & "form" & "' found in line " & i & "<br><br><b>" & tempformat & "</b>") end if i = i + 1 wend 17. Check if the client requesting service is from within MSU domain or from outside ip = Request.ServerVariables("REMOTE_ADDR") referer = Request.ServerVariables("HTTP_REFERER") if InStr(ip, "134.29") > 0 then response.write("inside MSU") else response.write("outside MSU") end if response.write("<br><br><b>" & ip & "</b>") response.write("<br><br>referring Page: <b>" & referer & "</b>") Note: You may use only self hand written code syntaxes written on both side of two sheets (4 pages). Detail code segments are not allowed. Must have 1 margin at the top of EACH page with names written in large letters. 8

9 Problem and Solutions: forma.html Problem1: A form contains a number of text boxes. On submission <script language="javascript"> the following values should be shown from the server side. function FindVal() a. Values entered in each of the text boxes. { b. Number of text boxes on the form. textval=''; document.forms[0].hidcount.value=document.forms[0].fname.length; for(i=0; i<document.forms[0].fname.length; i++) { textval=textval + "<br>"+ document.forms[0].fname[i].value; document.forms[0].hidfname.value=textval; </script> <form method=post action=forma.asp> <pre> Name: <input type= textbox name=fname size="20"> <input type= textbox name=fname size="20"> TechID: <input type= textbox name=fname size="20"> </pre> <input type=hidden name=hidcount> <input type=hidden name=hidfname> <input type= submit name=submit onclick="findval()"> </form> forma.asp Response.write("Values are : ") Response.write(request.form("hidFname")) Response.write("<br>Count is : ") Response.write(request.form("hidCount")) Page1.html <form action="page2.asp" method="post" name="theform"> <pre> Name: <input type="text" name="name"> <input type="text" name=" "> TechID: <input type="text" name="techid"> </pre> <input type="hidden" name="textboxcount" value=""> <input type="submit"> <script> count = 0; for (i=0; i<document.theform.elements.length; i++) { if (document.theform.elements[i].type == "text") count++; document.theform.textboxcount.value = count </script> </form> One solution using JavaScript and hidden text boxes to pass the text box count to the server side. The text box count is obtained by using length properties when all text box names are same. An alternative solution is to use different text box names. JavaScript properties of elements type is used to identify and count text boxes. The count value is passed to the serverusing hidden text box. Note the use of immediate JavaScript in the body of the html. So no event was necessary. However, you can use events (Onclick or Submit). Try it. Page2.asp Name: = request("name") <br> = request(" ") <br> TechID: = request("techid") <br><br> Text box count: =Request("TextBoxCount") 9

10 Counttextclient.html <script> function check(){ Problem2: A form contains a number of text boxes and radios. On submission the following values should be shown from the server side. a. Values entered in each of the text boxes and value of the selected radio b. Number of text boxes and radios on the form. c. Total number of elements on the form. </script> document.test.countradio.value=document.test.rad.length; document.test.totalelements.value=document.test.elements.length; return true; <form name="test" action="sumittest.asp" method="post" onsubmit="return check();"> <pre> <input type="text" name="text1" size="20"> Tech ID: <Input type="text" name="text1" size="20"> </pre> <input type="radio" name="rad" value="newuser"> New User<br> <input type="radio" name="rad" value="login"> login<br> <input type="submit" name="submit" value="submit"> <input type="hidden" name="countradio"> <input type="hidden" name="totaltext"> <input type="hidden" name="totalelements"> </form> Counttextbox.asp response.write (" " & request("text1")(1) & "<Br>") response.write ("Tech ID: " & request("text1")(2) & "<Br>") response.write ("Total Text Boxes: " & request("text1").count & "<Br>") response.write ("Selected Radio Button: " & request("rad") & "<Br>") response.write ("Count of radio buttons: " & request("countradio") & "<Br>") response.write ("Total Elements: " & request("totalelements") & "<Br>") The solution to get the count and value of text boxes have been used similar to the way of reading check boxes. All text box names are same. TRY OTHER SOLUTIONS AS ABOVE. Problem3 Write COMPLETE code pages so that when the Register button is clicked the location of the text box and the image will interchange, i.e. if the position of the image was on the top of the text box (fig a) then position of the image will shift to below the text box (fig b) and vice versa. [3 points] [note: More credits will be given if function is achieved by only one code page compared to if the function is achieved by two code pages] 10

11 Solution: Finaltest.asp <title>practice</title> <script language = "JavaScript"> function check (){ scr = "<form action='finaltest.asp' method=post name=theform>" scr = scr + "<img src = 'figure7_3.jpg' width=158 height=205> <BR>" scr = scr + "User Id:<input type=text name=userid Value = '... '><br><br>" scr = scr + "<input type='submit' Value='Register'>" scr = scr + "</form>" document.write(scr) </script> <form action="finaltest.asp" method="post" name="theform"> User Id:<input type="text" name="userid" Value = "... "><br><br> <img src = "figure7_3.jpg" width="158" height="205"> <BR> <input type="button" Value="Register" onclick = "check ()"> </form> (solve the above problem using asp) 11

2. Create a directory named TEMP in your C drive. Create a subdirectory in TEMP named after your name.

2. Create a directory named TEMP in your C drive. Create a subdirectory in TEMP named after your name. PRACTICE PROBLEMS Initial Set up 1. Create GROUPLOG database tables in MSACCESS for entry of your group meetings log with the following attributes: GROUPMEMBER (id, lastname, firstname, emailaddress, groupno)

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

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

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

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

HTML: Fragments, Frames, and Forms. Overview

HTML: Fragments, Frames, and Forms. Overview HTML: Fragments, Frames, and Forms Michael B. Spring Department of Information Science and Telecommunications University of Pittsburgh spring@ imap.pitt.edu http://www.sis. pitt.edu/~spring Overview Fragment

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

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

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

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

CHAPTER 6: CREATING A WEB FORM CREATED BY L. ASMA RIKLI (ADAPTED FROM HTML, CSS, AND DYNAMIC HTML BY CAREY)

CHAPTER 6: CREATING A WEB FORM CREATED BY L. ASMA RIKLI (ADAPTED FROM HTML, CSS, AND DYNAMIC HTML BY CAREY) CHAPTER 6: CREATING A WEB FORM INTERACTION BETWEEN A WEB FORM AND A WEB SERVER Without a form, a website is read-only. It only provides information. EXAMPLES OF FORMS USAGE Performing searches Posting

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

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

JavaScript CSCI 201 Principles of Software Development

JavaScript CSCI 201 Principles of Software Development JavaScript CSCI 201 Principles of Software Development Jeffrey Miller, Ph.D. jeffrey.miller@usc.edu Outline JavaScript Program USC CSCI 201L JavaScript JavaScript is a front-end interpreted language that

More information

Chapter 1 FORMS. SYS-ED/ Computer Education Techniques, Inc.

Chapter 1 FORMS. SYS-ED/ Computer Education Techniques, Inc. Chapter 1 FORMS SYS-ED/ Computer Education Techniques, Inc. Objectives You will learn: How to use forms and the related form types. Controls for interacting with forms. Menus and presenting users with

More information

Dynamic Form Processing Tool Version 5.0 November 2014

Dynamic Form Processing Tool Version 5.0 November 2014 Dynamic Form Processing Tool Version 5.0 November 2014 Need more help, watch the video! Interlogic Graphics & Marketing (719) 884-1137 This tool allows an ICWS administrator to create forms that will be

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

HTML forms and the dynamic web

HTML forms and the dynamic web HTML forms and the dynamic web Antonio Lioy < lioy@polito.it > english version created by Marco D. Aime < m.aime@polito.it > Politecnico di Torino Dip. Automatica e Informatica timetable.html departure

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

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

LAB Test 1. Rules and Regulations:-

LAB Test 1. Rules and Regulations:- LAB Test 1 Rules and Regulations:- 1. Individual Test 2. Start at 3.10 pm until 4.40 pm (1 Hour and 30 Minutes) 3. Open note test 4. Send the answer to h.a.sulaiman@ieee.org a. Subject: [LabTest] Your

More information

Form Processing in PHP

Form Processing in PHP Form Processing in PHP Forms Forms are special components which allow your site visitors to supply various information on the HTML page. We have previously talked about creating HTML forms. Forms typically

More information

Lesson 3. Form By Raymond Tsang. Certificate Programme in Cyber Security

Lesson 3. Form By Raymond Tsang. Certificate Programme in Cyber Security Lesson 3 Form By Raymond Tsang Certificate Programme in Cyber Security What is a form How to create a form Getting input from users Generate a result It s a section of a document containing normal content,

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

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

DAY 2. Creating Forms

DAY 2. Creating Forms DAY 2 Creating Forms LESSON LEARNING TARGETS I can identify and apply the different HTML tags to create a Web page form. I can describe the ways data is sent in a form in namevalue pairs. I can create

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

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

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

NETB 329 Lecture 13 Python CGI Programming

NETB 329 Lecture 13 Python CGI Programming NETB 329 Lecture 13 Python CGI Programming 1 of 83 What is CGI? The Common Gateway Interface, or CGI, is a set of standards that define how information is exchanged between the web server and a custom

More information

ABSOLUTE FORM PROCESSOR ADMINISTRATION OPTIONS

ABSOLUTE FORM PROCESSOR ADMINISTRATION OPTIONS ABSOLUTE FORM PROCESSOR ADMINISTRATION OPTIONS The Absolute Form Processor is very easy to use. In order to operate the system, you just need the menu at the top of the screen. There, you ll find all the

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

Javascript. UNIVERSITY OF MASSACHUSETTS AMHERST CMPSCI 120 Fall 2010

Javascript. UNIVERSITY OF MASSACHUSETTS AMHERST CMPSCI 120 Fall 2010 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

More information

Creating Forms. Speaker: Ray Ryon

Creating Forms. Speaker: Ray Ryon Creating Forms Speaker: Ray Ryon In this lesson we will discuss how to create a web form. Forms are useful because they allow for input from a user. That input can then be used to respond to the user with

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

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

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

PIC 40A. Lecture 19: PHP Form handling, session variables and regular expressions. Copyright 2011 Jukka Virtanen UCLA 1 05/25/12

PIC 40A. Lecture 19: PHP Form handling, session variables and regular expressions. Copyright 2011 Jukka Virtanen UCLA 1 05/25/12 PIC 40A Lecture 19: PHP Form handling, session variables and regular expressions 05/25/12 Copyright 2011 Jukka Virtanen UCLA 1 How does a browser communicate with a program on a server? By submitting an

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

COM1004 Web and Internet Technology

COM1004 Web and Internet Technology COM1004 Web and Internet Technology When a user submits a web form, how do we save the information to a database? How do we retrieve that data later? ID NAME EMAIL MESSAGE TIMESTAMP 1 Mike mike@dcs Hi

More information

Web Focused Programming With PHP

Web Focused Programming With PHP Web Focused Programming With PHP May 20 2014 Thomas Beebe Advanced DataTools Corp (tom@advancedatatools.com) Tom Beebe Tom is a Senior Database Consultant and has been with Advanced DataTools for over

More information

CSE 154 LECTURE 8: FORMS

CSE 154 LECTURE 8: FORMS CSE 154 LECTURE 8: FORMS Web data most interesting web pages revolve around data examples: Google, IMDB, Digg, Facebook, YouTube, Rotten Tomatoes can take many formats: text, HTML, XML, multimedia many

More information

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

External HTML E-form Guide

External HTML E-form Guide External HTML E-form Guide A guide for creation and setup of external e- froms for FileBound. Document Version: 6.5.2 Published Date: 2/27/2014 - 2 - Copyright Copyright 2013 FileBound All Rights Reserved.

More information

UNIT-VI CREATING AND USING FORMS

UNIT-VI CREATING AND USING FORMS UNIT-VI CREATING AND USING FORMS To create a fully functional web application, you need to be able to interact with your users. The common way to receive information from web users is through a form. Forms

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 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

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

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

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

This is an open-book, open-notes, open-computer exam. You may not consult with anyone other than the instructor while working on this exam.

This is an open-book, open-notes, open-computer exam. You may not consult with anyone other than the instructor while working on this exam. FINAL EXAM KEY SPRING 2016 CSC 105 INTERACTIVE WEB DOCUMENTS NICHOLAS R. HOWE This is an open-book, open-notes, open-computer exam. You may not consult with anyone other than the instructor while working

More information

Control Solutions i.candoit, i.board, and Babel Buster SP Web Server CGI Overview (2/2008)

Control Solutions i.candoit, i.board, and Babel Buster SP Web Server CGI Overview (2/2008) Control Solutions i.candoit, i.board, and Babel Buster SP Web Server CGI Overview (2/2008) User HTML User HTML may be installed as a wrapper around the default web pages. To install user HTML, open an

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

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

COMP1000 Mid-Session Test 2017s1

COMP1000 Mid-Session Test 2017s1 COMP1000 Mid-Session Test 2017s1 Total Marks: 45 Duration: 55 minutes + 10 min reading time This examination has three parts: Part 1: 15 Multiple Choice Questions (15 marks /45) Part 2: Practical Excel

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

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

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

CIS 339 Section 2. What is JavaScript

CIS 339 Section 2. What is JavaScript CIS 339 Section 2 Introduction to JavaScript 9/26/2001 2001 Paul Wolfgang 1 What is JavaScript An interpreted programming language with object-oriented capabilities. Shares its syntax with Java, C++, and

More information

How to Make a Contact Us PAGE in Dreamweaver

How to Make a Contact Us PAGE in Dreamweaver We found a great website on the net called http://dreamweaverspot.com and we have basically followed their tutorial for creating Contact Forms. We also checked out a few other tutorials we found by Googling,

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

blink.html 1/1 lectures/6/src/ form.html 1/1 lectures/6/src/

blink.html 1/1 lectures/6/src/ form.html 1/1 lectures/6/src/ blink.html 1/1 3: blink.html 5: David J. Malan Computer Science E-75 7: Harvard Extension School 8: 9: --> 11:

More information

CSC Web Technologies, Spring HTML Review

CSC Web Technologies, Spring HTML Review CSC 342 - Web Technologies, Spring 2017 HTML Review HTML elements content : is an opening tag : is a closing tag element: is the name of the element attribute:

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

Web Programming. Based on Notes by D. Hollinger Also Java Network Programming and Distributed Computing, Chs.. 9,10 Also Online Java Tutorial, Sun.

Web Programming. Based on Notes by D. Hollinger Also Java Network Programming and Distributed Computing, Chs.. 9,10 Also Online Java Tutorial, Sun. Web Programming Based on Notes by D. Hollinger Also Java Network Programming and Distributed Computing, Chs.. 9,10 Also Online Java Tutorial, Sun. 1 World-Wide Wide Web (Tim Berners-Lee & Cailliau 92)

More information

Controlled Assessment Task. Question 1 - Describe how this HTML code produces the form displayed in the browser.

Controlled Assessment Task. Question 1 - Describe how this HTML code produces the form displayed in the browser. Controlled Assessment Task Question 1 - Describe how this HTML code produces the form displayed in the browser. The form s code is displayed in the tags; this creates the object which is the visible

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

Lecture 6: More Arrays & HTML Forms. CS 383 Web Development II Monday, February 12, 2018

Lecture 6: More Arrays & HTML Forms. CS 383 Web Development II Monday, February 12, 2018 Lecture 6: More Arrays & HTML Forms CS 383 Web Development II Monday, February 12, 2018 Lambdas You may have encountered a lambda (sometimes called anonymous functions) in other programming languages The

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

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

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

D B M G. Introduction to databases. Web programming: the HTML language. Web programming. The HTML Politecnico di Torino 1

D B M G. Introduction to databases. Web programming: the HTML language. Web programming. The HTML Politecnico di Torino 1 Web programming The HTML language The HTML language Basic concepts User interfaces in HTML Forms Tables Passing parameters stored in forms @2017 Politecnico di Torino 1 Basic concepts HTML: HyperText Markup

More information

White Paper - WPY - Order printed material

White Paper - WPY - Order printed material Cision NE - IT Development White Paper - WPY - Order printed material Author: Niklas Emilsson Contents 1 Cision WPY Order Printed Materials... 1 2 System platform... 1 2.1 Technical system overview...

More information

Client-side Processing

Client-side Processing Client-side Processing 1 Examples: Client side processing 1. HTML 2. Plug-ins 3. Scrips (e.g. JavaScript, VBScript, etc) 4. Applet 5. Cookies Other types of client-side processing 1. Cascading style sheets

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

PYTHON CGI PROGRAMMING

PYTHON CGI PROGRAMMING PYTHON CGI PROGRAMMING http://www.tutorialspoint.com/python/python_cgi_programming.htm Copyright tutorialspoint.com The Common Gateway Interface, or CGI, is a set of standards that define how information

More information

Executing Simple Queries

Executing Simple Queries Script 8.3 The registration script adds a record to the database by running an INSERT query. 1

More information

Databases HTML and PHP I. (GF Royle, N Spadaccini ) HTML/PHP I 1 / 28

Databases HTML and PHP I. (GF Royle, N Spadaccini ) HTML/PHP I 1 / 28 Databases HTML and PHP I (GF Royle, N Spadaccini 2006-2010) HTML/PHP I 1 / 28 This lecture The main purpose of this lecture is to cover HTML forms and how a PHP script can obtain values from the user.

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

Forms, Form Events, and Validation. Bok, Jong Soon

Forms, Form Events, and Validation. Bok, Jong Soon Forms, Form Events, and Validation Bok, Jong Soon jongsoon.bok@gmail.com www.javaexpert.co.kr How to Access to Form In JavaScript, access forms through the Document Object Model (DOM). The first approach

More information

Functions. INFO/CSE 100, Spring 2006 Fluency in Information Technology.

Functions. INFO/CSE 100, Spring 2006 Fluency in Information Technology. Functions INFO/CSE 100, Spring 2006 Fluency in Information Technology http://www.cs.washington.edu/100 4/24/06 fit100-12-functions 1 Readings and References Reading» Fluency with Information Technology

More information

Enterprise Knowledge Platform Adding the Login Form to Any Web Page

Enterprise Knowledge Platform Adding the Login Form to Any Web Page Enterprise Knowledge Platform Adding the Login Form to Any Web Page EKP Adding the Login Form to Any Web Page 21JAN03 2 Table of Contents 1. Introduction...4 Overview... 4 Requirements... 4 2. A Simple

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

This is CS50. Harvard College Fall Quiz 1 Answer Key

This is CS50. Harvard College Fall Quiz 1 Answer Key Quiz 1 Answer Key Answers other than the below may be possible. Know Your Meme. 0. True or False. 1. T 2. F 3. F 4. F 5. T Attack. 6. By never making assumptions as to the length of users input and always

More information

ITS331 IT Laboratory I: (Laboratory #11) Session Handling

ITS331 IT Laboratory I: (Laboratory #11) Session Handling School of Information and Computer Technology Sirindhorn International Institute of Technology Thammasat University ITS331 Information Technology Laboratory I Laboratory #11: Session Handling Creating

More information

Advanced HTML 5.1 INTRODUCTION 5.2 OBJECTIVES

Advanced HTML 5.1 INTRODUCTION 5.2 OBJECTIVES 5 Advanced HTML 5.1 INTRODUCTION An effective way to organize web documents, visually, and also logically, by dividing the page into different parts is the necessity of the website today. In each part

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

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 Security: Vulnerabilities & Attacks

Web Security: Vulnerabilities & Attacks Computer Security Course. Web Security: Vulnerabilities & Attacks Type 2 Type 1 Type 0 Three Types of XSS Type 2: Persistent or Stored The attack vector is stored at the server Type 1: Reflected The attack

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

SocialMiner Configuration

SocialMiner Configuration This section outlines the initial setup that must be performed when SocialMiner is first installed as well as the ongoing user-configurable options that can be used once the system is up and running. The

More information

Control Flow. INFO/CSE 100, Spring 2006 Fluency in Information Technology.

Control Flow. INFO/CSE 100, Spring 2006 Fluency in Information Technology. Control Flow INFO/CSE 100, Spring 2006 Fluency in Information Technology http://www.cs.washington.edu/100 1 Reading Readings and References» Fluency with Information Technology Chapter 21, Iteration Principles

More information

Developing Ajax Applications using EWD and Python. Tutorial: Part 2

Developing Ajax Applications using EWD and Python. Tutorial: Part 2 Developing Ajax Applications using EWD and Python Tutorial: Part 2 Chapter 1: A Logon Form Introduction This second part of our tutorial on developing Ajax applications using EWD and Python will carry

More information

CPSC 481: CREATIVE INQUIRY TO WSBF

CPSC 481: CREATIVE INQUIRY TO WSBF CPSC 481: CREATIVE INQUIRY TO WSBF J. Yates Monteith, Fall 2013 Schedule HTML and CSS PHP HTML Hypertext Markup Language Markup Language. Does not execute any computation. Marks up text. Decorates it.

More information

Course Topics. IT360: Applied Database Systems. Introduction to PHP

Course Topics. IT360: Applied Database Systems. Introduction to PHP IT360: Applied Database Systems Introduction to PHP Chapter 1 and Chapter 6 in "PHP and MySQL Web Development" Course Topics Relational model SQL Database design Normalization PHP MySQL Database administration

More information

chapter 7 Interacting with Users Tell me and I will forget. Show me and I will remember. Involve me and I will understand.

chapter 7 Interacting with Users Tell me and I will forget. Show me and I will remember. Involve me and I will understand. chapter 7 Interacting with Users Tell me and I will forget. Show me and I will remember. Involve me and I will understand. Aristotle In this chapter, you will learn how to: Define the elements of an HTML

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

Come & Join Us at VUSTUDENTS.net

Come & Join Us at VUSTUDENTS.net Come & Join Us at VUSTUDENTS.net For Assignment Solution, GDB, Online Quizzes, Helping Study material, Past Solved Papers, Solved MCQs, Current Papers, E-Books & more. Go to http://www.vustudents.net and

More information