12 1 Redirection CGI/Perl Programming By Diane Zak.

Slides:



Advertisements
Similar presentations
Web Development & Design Foundations with XHTML
Advertisements

HTML. The World Wide Web Protocols Addresses HTML.
 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 7 - JavaScript: Introduction to Scripting Outline 7.1 Introduction 7.2 Simple Program: Printing.
In this lecture, you will learn: ❑ How to link between pages of your site ❑ How to link to other sites ❑ How to structure the folders on your web site.
Basic HTML Tags.
Hyperlink & Form Pertemuan 11 Matakuliah: L0182 / Web & Animation Design Tahun: 2008.
CIS101 Introduction to Computing Week 08. Agenda Your questions JavaScript text Resume project HTML Project Six This week online Next class.
Creating a Form with Selection Menus The SELECT control creates a selection menu This control only allows the visitor to choose pre-defined choices There.
HTML Comprehensive Concepts and Techniques Second Edition Project 8 Integrating JavaScript with HTML.
CM143 - Web Week 2 Basic HTML. Links and Image Tags.
Lecture 13. A Very Brief Introduction to HTML and XHTML, part II Instructor: Jie Yang Department of Computer Science University of Massachusetts Lowell.
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.
Meta Tags What are Meta Tags And How Are They Best Used?
ITIS 1210 Introduction to Web-Based Information Systems Chapter 41 How Animation on the Web Works.
HTML Links and Anchors.
PHP Tutorials 02 Olarik Surinta Management Information System Faculty of Informatics.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
Lesson 13: Building Web Forms Introduction to Adobe Dreamweaver CS6 Adobe Certified Associate: Web Communication using Adobe Dreamweaver CS6.
Chapter 33 CGI Technology for Dynamic Web Documents There are two alternative forms of retrieving web documents. Instead of retrieving static HTML documents,
INE1020 Introduction to Internet Engineering Tutorial 8 All about Lab 6.
Basic HTML Hyper text markup Language. Re-cap  … - The tag tells the browser that this is an HTML document The html element is the outermost element.
HTML. What is HTML?  HTML is a language for creating web pages.  HTML stands for Hyper Text Markup Language  A markup language has tags which are codes.
2 1 Sending Data Using a Hyperlink CGI/Perl Programming By Diane Zak.
HTML Introduction to HTML Tags. HTML Document My first HTML document Hello world!
CHAPTER 3 USING HYPERLINKS TO CONNECT CONTENT. LEARNING OBJECTIVES How to use the and anchor tag pair to create a text-based hyperlink. How to use the.
Perl Web Page – Just Enough Pepper. Web site Set up the top of your script to indicate perl and plain text #!/usr/bin/perl print "Content-type:text/plain\n\n";
Integrating JavaScript and HTML5 HTML5 & CSS 7 th Edition.
Lesson 1: Web Pages Web Browsers. Linear media & Hypermedia Books are presented in a linear format. Pages and chapters comprise a book. You can create.
Introduction to HTML. What is a HTML File?  HTML stands for Hyper Text Markup Language  An HTML file is a text file containing small markup tags  The.
Linking web pages Wah Yan College (Hong Kong) Mr. Li C.P.
Developing a Web Site. Web Site Navigational Structures A storyboard is a diagram of a Web site’s structure, showing all the pages in the site and indicating.
INTRODUCTION. What is HTML? HTML is a language for describing web pages. HTML stands for Hyper Text Markup Language HTML is not a programming language,
Copyright 2007, Information Builders. Slide 1 Understanding Basic HTML Amanda Regan Technical Director June, 2008.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
9 1 DBM Databases CGI/Perl Programming By Diane Zak.
11 1 Cookies CGI/Perl Programming By Diane Zak Objectives In this chapter, you will: Learn the difference between temporary and persistent cookies.
4 Chapter Four Introduction to HTML. 4 Chapter Objectives Learn basic HTML commands Discover how to display graphic image objects in Web pages Create.
Web Development & Design Foundations with XHTML Chapter 2 HTML/XHTML Basics.
3 1 Sending Data Using an Online Form CGI/Perl Programming By Diane Zak.
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.
7 1 User-Defined Functions CGI/Perl Programming By Diane Zak.
Introduction to the Document Object Model DOM *Understand document structure manipulation *Dynamic effects in web pages *Programming, scripting, web content.
An Introduction to JavaScript By: John Coliton Tuesday, November 10, 1998 Center for Teaching and Learning.
Introduction to CGI/Perl Please use speaker notes for additional information!
Using Frames in a Web Site Project 6. Project Objectives Project 6: Using Frames in a Web Site 2 Define terms related to frames Describe the steps used.
10 1 Hidden Fields and CGI/Perl Programming By Diane Zak.
Website design and structure. A Website is a collection of webpages that are linked together. Webpages contain text, graphics, sound and video clips.
1 HTML forms (cont.)
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
HTML Concepts and Techniques Fifth Edition Chapter 3 Creating Web Pages with Links, Images, and Formatted Text.
HTML Links HTML uses a hyperlink to another document on the Web.
Headings are defined with the to tags. defines the largest heading. defines the smallest heading. Note: Browsers automatically add an empty line before.
Creating Web Page Forms COE 201- Computer Proficiency.
The Web Browser Button Game Click to play Click to play.
Unit 3 — Advanced Internet Technologies Lesson 10 — Introduction to XHTML.
Creating and Editing a Web Page
1 More About HTML Images and Links. 22 Objectives You will be able to Include images in your HTML page. Create links to other pages on your HTML page.
Web Technology (NCS-504) Prepared By Mr. Abhishek Kesharwani Assistant Professor,UCER Naini,Allahabad.
REEM ALMOTIRI Information Technology Department Majmaah University.
Session: 4. © Aptech Ltd. 2Creating Hyperlinks and Anchors / Session 4  Describe hyperlinks  Explain absolute and relative paths  Explain how to hyperlink.
 2003 Prentice Hall, Inc. All rights reserved. Outline Chapter 2 HTML (Hypertext Markup Language) Part II.
Unit 5 The Web Book Test. Unit 5 Test The Web Book Test 1. On the bottom of page 46, why is writing web pages not like writing printed documents ?
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 2 Key Concepts 1 Copyright © Terry Felke-Morris.
HTML And the Internet. HTML and the Internet ► HTML: HyperText Markup Language  Language in which all pages on the web are written  Not Really a Programming.
Sending data with CGI/Perl Please use speaker notes for additional information!
Section 10.1 Define scripting
Integrating JavaScript and HTML
Creating Forms on a Web Page
To insert a hyperlink ( a web page address, URL) using text
HTML LINKS
Presentation transcript:

12 1 Redirection CGI/Perl Programming By Diane Zak

12 2 Objectives In this chapter, you will: Include the Location header in a script Include the Refresh header in a script

12 3 Introduction Documents often move on the Web from one location to another –Link to new URL so user must click to go to new location –Automatically forward the browser to a new address Immediately After a period of time (seconds) –META tag – HTML –Location Header – script –Refresh Header - script

12 4 Redirecting a browser Location header: –Immediately redirects the browser –Syntax: print “Location: url\n\n”; –Example: print “Location: The 1 st newline character identifies the end of the Location header The 2 nd newline character inserts a blank line below the header to signal end of header section Location header used instead of Content-type header

12 5 Redirecting a Browser Refresh header: –Waits a specified number of seconds before redirection –Syntax: print “Refresh: seconds; URL=url\n”; –Example: print “Refresh: 3; URL=“ print “Content-type: text/html\n\n”; Contains one newline character because it is used with the Content-type header

12 6 Using a Refresh Header

12 7 Using a Refresh Header Uses Refresh header to redirect the page in 3 seconds

12 8 Using a Location Header

12 9 Using a Location Header If no Name was typed into the cara1.html page

12 10 Summary You can use the Location header or the Refresh header in a CGI script to redirect the user’s browser to another location. The Location header redirects the browser immediately. –Syntax: print “Location: url\n\n”; The Refresh header waits for a specified number of seconds until redirection. –Syntax: print “Refresh: seconds; URL=url\n”; –Is used together with the Content-type header