Title: Topic: Text, Date and Time Functions
1Module 1
Relationship
Computer Technology III
Topic Text, Date and Time Functions
By Shiela Marie B. Pelayo
2Day 2
3Please open the URL below http//www.w3schools.co
m/asp/showasp.asp?filenamedemo_cookies Please
click Refresh twice. What did you notice in the
web page everytime Refresh is clicked? __________
_______________________________ __________________
_______________________
4What are you seeing now?
Yes, its a cookie. But what you will make now is
a website cookie!!! Before you write the script
of the cookie, please open the URL below and read
something about its definition and
function. http//www.webopedia.com/TERM/c/cookie.h
tml
5i work
- Directions Please type your answers in the space
provided. - 1. What is a cookie?
- 2. What is the function of a cookie?
6Integration The students shall create a cookie
which contains the current date and time, and the
number of times the user visited the El Fili web
page. 1. Make the subfolder El Fili in the 2nd
Term folder. 2. Copy the script of the next slide
in the Notepad. Save the file as elfili.asp in
the El Fili subfolder. O R You may get
the script from the site below http//www.w3scho
ols.com/asp/showasp.asp?filenamedemo_cookies
Hands-on1
7ltdim numvisitsresponse.cookies("NumVisits").Exp
iresdate365 numvisitsrequest.cookies("NumVisit
s")if numvisits"" then  response.cookies("Num
Visits")1Â Â response.write("Welcome! This is
the first time you are visiting this Web
page.")else  response.cookies("NumVisits")numv
isits1Â Â response.write("You have visited this
")Â Â response.write("Web page " numvisits)Â Â
if numvisits1 then    response.write " time
before!"  else    response.write " times
before!"Â Â end ifend ifgt lthtmlgt ltbodygt 2.
View the output using the labserve. Â Â
83. After viewing the output, the student must
improve the cookie script by adding the current
date and time. Use the date and time
functions. 4. After adding the date and time in
the web pages output, include the script of your
El Fili part now. Display the title, El
Filibusterismo, and a short introduction about El
Fili in the web page. 5. Add a form also with a
Year textbox in the web page. The user shall
enter a year only in the textbox and the event
related with El Fili will be displayed in the web
page. You will use IF statement here. 6. Save
your file.
9Example
9/30/2008 95430 AM You have visited this web
page 2 times before!
El Filibusterismo It is known by its English
alternate title ,The Reign of Greed, is the
second novel written by Philippine national hero
José Rizal. It is a sequel to Noli Me Tangere
and like the first book, was written in Spanish.
For more information about the events related
with El Fili, please type the year in the
textbox below Year March 29,1891 - Jose
Rizal finished writing El Filibusterismo
1891
Submit
Clear
106. View the output. Evaluate the output in 1/8
cross wise of paper. Rating Scale 10/10 The
cookie and the form works perfectly in the El
Fili web page. 6/10 One of the required
output is not present in the web page. 4/10-
The cookie and the ASP functions script did
not work. The script has many errors. 7.
Submit the 1/8 cross wise paper to the teacher.
11Valuing The students shall ponder on the thought
below The relationships among people, things
and places can always be improved to achieve a
better result. After this, give real life
examples in 2-3 statements where relationship
can be used to achieve a better result. Ex You
have bad relationship with friends, siblings,
parents, classmates, etc. What are you going to
do to make the relationship better? Write your
answers in ¼ sheet of pad paper.
12Summary
- What are the different ASP functions that you
have used in the El Fili web page? - 2. What is the relationship of cookie to the
efficiency of the El Fili web page?
13Study for
Quiz2