Www forms and search
This presentation is the property of its rightful owner.
Sponsored Links
1 / 25

WWW Forms and Search PowerPoint PPT Presentation


  • 58 Views
  • Uploaded on
  • Presentation posted in: General

WWW Forms and Search. Forms. URL - always fetch a particular page What if the information we want varies from time to time and from user to user?. Forms. Forms - requests to a web-site. How to get information from the user When to send the request Where to send the request

Download Presentation

WWW Forms and Search

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Www forms and search

WWW Forms and Search


Forms

Forms

  • URL - always fetch a particular page

  • What if the information we want varies from time to time and from user to user?


Forms1

Forms


Forms requests to a web site

Forms - requests to a web-site

  • How to get information from the user

  • When to send the request

  • Where to send the request

  • How to send the user’s information with the request


Www forms and search

<body>

<h1>Example form</h1>

<form action="http://icie.cs.byu.edu/cgi/findMe">

First name

<input name=firstName size=20 value="Phred">

<p>

Last name

<input name=lastName size=20 value="Phinster">

<p>

<input type="submit" value="Find Me">

</form>

</body>


Labels

Labels

<body>

<h1>Example form</h1>

<formaction="http://icie.cs.byu.edu/cgi/findMe">

First name

<input name=firstName size=20 value="Phred">

<p>

Last name

<input name=lastName size=20 value="Phinster">

<p>

<input type="submit" value="Find Me">

</form>

</body>


Labels1

Labels


How to get info from the user

How to get info from the user

<body>

<h1>Example form</h1>

<form action="http://icie.cs.byu.edu/cgi/findMe">

First name

<input name=firstName size=20 value="Phred">

<p>

Last name

<input name=lastName size=20 value="Phinster">

<p>

<input type="submit" value="Find Me">

</form>

</body>


Parts to an input tag

Parts to an input tag

  • <input name=“N” size=20>

  • Name - the name that this input information will be given

  • Size - the number of characters that the user can type


When to send the request

When to send the request

<body>

<h1>Example form</h1>

<form action="http://icie.cs.byu.edu/cgi/findMe">

First name

<input name=firstName size=20 value="Phred">

<p>

Last name

<input name=lastName size=20 value="Phinster">

<p>

<input type="submit" value="Find Me">

</form>

</body>


When to send the request1

When to send the request


Where to send the request

Where to send the request

<body>

<h1>Example form</h1>

<form action="http://icie.cs.byu.edu/cgi/findMe">

First name

<input name=firstName size=20 value="Phred">

<p>

Last name

<input name=lastName size=20 value="Phinster">

<p>

<input type="submit" value="Find Me">

</form>

</body>


How to send the user information in a url

How to send the user informationin a URL

<body>

<h1>Example form</h1>

<form action="http://icie.cs.byu.edu/cgi/findMe">

First name

<input name=firstName size=20 value="Phred">

<p>

Last name

<input name=lastName size=20 value="Phinster">

<p>

<input type="submit" value="Find Me">

</form>

</body>

http://icie.cs.byu.edu/cgi/findMe?firstName=Phred&lastName=Phinster


How to send the user information in a url1

How to send the user informationin a URL

<body>

<h1>Example form</h1>

<form action="http://icie.cs.byu.edu/cgi/findMe">

First name

<input name=firstName size=20 value="Phred">

<p>

Last name

<input name=lastName size=20 value="Phinster">

<p>

<input type="submit" value="Find Me">

</form>

</body>

http://icie.cs.byu.edu/cgi/findMe?firstName=Phred&lastName=Phinster


How to send the user information in a url2

How to send the user informationin a URL

<body>

<h1>Example form</h1>

<form action="http://icie.cs.byu.edu/cgi/findMe">

First name

<input name=firstName size=20 value="Phred">

<p>

Last name

<input name=lastName size=20 value="Phinster">

<p>

<input type="submit" value="Find Me">

</form>

</body>

http://icie.cs.byu.edu/cgi/findMe?firstName=Phred&lastName=Phinster


Forms how does the server respond

Forms - How does the server respond?

  • Not every URL refers to a page

  • CGI - Common Gateway Interface

  • You can give a server a program and place it at a URL.

  • The server will then run the program and return its result rather than fetch a page


Search

Search

  • How do we describe the page that we want?


Search1

Search

  • How does Google know where that page is?

  • Find as many web pages as you can

  • For each web page 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


How does your browser ask for the search

How does your browser ask for the search


Cs 100 which page

CS 100 - Which page?


Cs 100 the winner

CS 100 - the winner

  • Why? Both have the words CS 100

  • CS 100 in <title>

  • CS 100 in text


Problems with word searches

Problems with word searches

  • Search for “doctor”

  • What about pages with the word “doctors”?

  • What about pages with the word “physicians”?

  • What about pages about “witch doctors”?

  • What if the page only has a picture of a doctor?

  • What if the only use of the word doctor is in a picture?


Blocking pornography

Blocking pornography

  • The reverse of the search problem

  • I don’t want pages that have this

    • How do you describe what you don’t want?


Blocking pornography1

Blocking pornography

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


  • Login