Question
HTML Javascript malltxt.htm The Cutler Shopping Mall Mall.txt Cutler Mall is home to your favorite stores like Boston Store, JCPenney, and Sears. We feature more
HTML Javascript
malltxt.htm
Mall.txt
Cutler Mall is home to your favorite stores like Boston Store, JCPenney, and Sears. We feature more than 110 specialty stores including Aveda, Williams-Sonoma, Banana Republic, Express, Ann Taylor, Abercrombie & Fitch, and American Eagle Outfitters. New specialty stores include Pottery Barn, Coldwater Creek, Hollister Co., Abercrombie, Aeropostale, Weathervane, Helzberg Diamonds, and Godiva Chocolatier.
The Mall has 24 delicious eateries, a family playground, Internet Kiosk, and baby-sitting facilities; making a visit to the Cutler Mall a true shopping experience.
Address ======= The Cutler Mall 20050 Enterprise Avenue Cutler, IA 43109 (281) 555-9081
Links ===== Home Store Directory Gift Ideas Mall Gift Cards Special Events Jobs Security Leasing Sponsorships Contact Us
Mall Hours ========== Monday - Saturday: 10am - 9pm Sunday: 11am - 6pm
timetxt.js
/* New Perspectives on JavaScript, 2nd Edition Tutorial 2 Case Problem 4
Author: Date:
Function List: dayDiff(start, stop) Calculates the number of days, rounded down the next lowest integer, between a starting date and stopping date.
hoursDiff(start, top) Calculates the number of hours left in the current day rounded down to the next lowest integer between a starting date and the stopping date.
minutesDiff(start, stop) Calculates the number of minutes left in the current hour rounded down to the next lowest integer between a starting date and the stopping date.
showDate(time) Displays the value of the time object in the format: mm/dd/yyyy
showTime(time) Displays the value of the time object in the format: hh:mm am/pm */
The Cutler Mall Alice Samuels is the director of promotion for the Cutler Shopping Mall, a large new mall opening on March 23 at 9:00 a.m. in Cutler, lowa. She asked you to design the web page announcing the mall's opening. She's provided the text of the page as well as several graphic images; however, she also wants you to program a countdown clock that displays the days, hours, and minutes until the mall opens. The final design of the site is up to you, and you may supplement the provided material with your own. Complete the following: 1. Use your text editor to open the malltxt.htm file from the tutorial.02 \case4 folder, enter your name and the date in the head section, and then save the file as mall.htm in the same folder. 2. Insert a Web form named mallclock that has the following fields: A day Now field that displays the current date in the format month/day/year A time Now field that displays the time in 12-hour format A days field that displays the number of days until the mall opens An hours field that displays the number of hours left in the current day A minutes field that displays the number of minutes left in the current hour; round this value to the nearest minute 3. Add the remaining content to the Web page. Refer to the mall.txt text file in the tutorial.02\case4 folder for the content that Alice wants you to include. Insert any styles for the Web page in an external file named mall.css. Link the mall.htm file to this style sheet. 4. Use your text editor to open the timetxt.js file from the tutorial.02\case4 folder, enter your name and the date in the comment section, and then save the file as time.js in the same folder. In the file, add the following functions (refer to the functions and codes from the tutorial case for help in writing these functions): A daysDiffo function that calculates the number of days, rounded down to the next lowest integer, between a starting date and a stopping date An hoursDiffo function that calculates the number of hours left in the current day rounded down to the next lowest integer A minutes Diffo function that calculates the number of minutes left in the current hour rounded down to the next lowest integer A show Date() function that displays the value of a date object in the format month/day/year A showTime() function that displays the value of a date object in the format hour minute a.m./p.m. 6. Insert an external script element to access the functions in the time.js Script file from the mall.htm file. 7. Add an embedded script to the mall.htm file to use the functions from the time.js file to create a function named countDownClock() that displays the current date and time in the document as well as the days, hours, and minutes remaining until the mall opening, Assume an opening date of March 23 and an opening time of 9:00 a.m. For the year, use a starting year value of the current year, but if the current date falls after March 23 of the current year, change the year value for the opening date to the next year. (Hint: Apply conditional operators along with the getFull Year() and setFull Year() functions to set the year value of the opening date.) 8. Have the countDownClock() function run when the page initially opens and then every 60 seconds thereafter. 9. Submit your completed files to your instructor
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started