Foundations of Computing - PowerPoint PPT Presentation

1 / 20
About This Presentation
Title:

Foundations of Computing

Description:

td - Table Data Cell th - Table Header tr - Table Row. Review. CS 100 ... If site is on the black list then refuse to make an Internet connection ... – PowerPoint PPT presentation

Number of Views:43
Avg rating:3.0/5.0
Slides: 21
Provided by: danrol
Category:

less

Transcript and Presenter's Notes

Title: Foundations of Computing


1
Discussion 15 WWW Forms I and Search
2
HTML Tags
Review
  • ltagt - Anchor
  • ltbgsoundgt - Audio Sound
  • ltblinkgt - Blink text
  • ltbodygt - Document body
  • ltcentergt - Center text
  • ltfieldsetgt - Item grouping
  • ltfontgt - Font Specification
  • lth1gt-lth6gt - Headings
  • lthrgt - Horizontal Line
  • ltimggt - Image
  • ltlegendgt - Fieldset caption

3
HTML Tags
Review
  • ltmarqueegt - Marquee
  • ltpregt - Preformatted Text
  • lttitlegt - Document title
  • ltligt - List item
  • ltolgt - Ordered List
  • ltulgt - Unordered List
  • lttablegt - Tables
  • lttdgt - Table Data Cell
  • ltthgt - Table Header
  • lttrgt - Table Row

4
Linking w/in a Document
Review
  • The first ltagt tag specifies a named fragment the
    second ltagt tag links back to the named fragment.
  • This is the default input type.
  • Examples
  • lta name"fragmentname"gtText lt/agt
  • lta href"fragmentname"gtLink to Text lt/agt

5
WWW Forms and Search
6
Web Access
  • URL - always fetch a particular page?
  • What if the information we want varies from time
    to time and from user to user?

7
Web-site Requests
  • How does the web-site get information from the
    user?
  • When does a user send the request?
  • Where does the user send the request?
  • How does the user send the information with the
    request?

8
HTML Forms
  • ltbodygt
  • lth1gtExample formlt/h1gt
  • ltform action"http//students.cs.byu.edu/cgi/findM
    e"gt
  • First name
  • ltinput type"text" name"firstName"
  • size"20" value"Phred" /gt
  • ltp /gt
  • Last name
  • ltinput type"text" name"lastName"
  • size"20" value"Phinster" /gt
  • ltp /gt
  • ltinput type"submit" value"Find Me" /gt
  • lt/formgt
  • lt/bodygt

9
Labels
  • ltbodygt
  • lth1gtExample formlt/h1gt
  • ltform action"http//students.cs.byu.edu/cgi/findM
    e"gt
  • First name
  • ltinput type"text" name"firstName"
  • size"20" value"Phred" /gt
  • ltp /gt
  • Last name
  • ltinput type"text" name"lastName"
  • size"20" value"Phinster" /gt
  • ltp /gt
  • ltinput type"submit" value"Find Me" /gt
  • lt/formgt
  • lt/bodygt

10
User Input
  • ltbodygt
  • lth1gtExample formlt/h1gt
  • ltform action"http//students.cs.byu.edu/cgi/findM
    e"gt
  • First name
  • ltinput type"text" name"firstName"
  • size"20" value"Phred" /gt
  • ltp /gt
  • Last name
  • ltinput type"text" name"lastName"
  • size"20" value"Phinster" /gt
  • ltp /gt
  • ltinput type"submit" value"Find Me" /gt
  • lt/formgt
  • lt/bodygt

Default value
Name of variable to contain the information
Maximum number of characters allowed
11
Send the Request
  • ltbodygt
  • lth1gtExample formlt/h1gt
  • ltform action"http//students.cs.byu.edu/cgi/findM
    e"gt
  • First name
  • ltinput type"text" name"firstName"
  • size"20" value"Phred" /gt
  • ltp /gt
  • Last name
  • ltinput type"text" name"lastName"
  • size"20" value"Phinster" /gt
  • ltp /gt
  • ltinput type"submit" value"Find Me" /gt
  • lt/formgt
  • lt/bodygt

What to do with the information
Caption on input button
12
Where to Send Request
  • ltbodygt
  • lth1gtExample formlt/h1gt
  • ltform action"http//students.cs.byu.edu/cgi/findM
    e"gt
  • First name
  • ltinput type"text" name"firstName"
  • size"20" value"Phred" /gt
  • ltp /gt
  • Last name
  • ltinput type"text" name"lastName"
  • size"20" value"Phinster" /gt
  • ltp /gt
  • ltinput type"submit" value"Find Me" /gt
  • lt/formgt
  • lt/bodygt

13
Browser Request for the Search
14
How does the Server Respond?
Static HTML Page
Server
Client
  • CGI - Common Gateway Interface
  • URL specifies to the server a program.
  • The program generates an HTML page.

15
Search
  • How do we search on the internet?
  • How do we describe the page that we want?

16
Search
  • How does Google know where that page is?
  • Pro-active web sites
  • Contract w/Google
  • Pay per click
  • Google finds as many web pages as it can.
  • Web crawler
  • Web sniffing
  • For each web page found
  • Prepare a list of words on that page
  • For each word in all of the web keep a list of
    pages that have that word

17
CS 100 - Which page?
18
CS 100 - the winner
  • Why? Both have the words CS 100
  • CS 100 in lttitlegt
  • CS 100 in text

19
Problems with word searches
  • Search for a medical doctor
  • What about pages with the word doctors?
  • What about pages with the word physicians?
  • What about pages about witch doctors?
  • What about pages with college professors?
  • What if the page only has a picture of a doctor?
  • What if the only use of the word doctor is in a
    picture?

20
Blocking pornography
  • The reverse of the search problem.
  • I dont want pages that have this
  • How do you describe what you dont want?
  • Keep a list of all bad sites
  • If site is on the black list then refuse to make
    an Internet connection
  • What if someone creates a new site?
  • Keep a list of bad words and block any URL or
    page that has those words
  • What about Middlesex, England?
  • What about breast cancer?
  • What about slang words?
  • What about pictures?
Write a Comment
User Comments (0)
About PowerShow.com