Question: For question (2) below, just add the necessary CSS properties to the digital clock to position the clock to the top right corner in the

For question (2) below, just add the necessary CSS properties to the digital clock to position the clock to the top right corner in the #clock attribute that is already provided in the code.

Question (2): Javascript code is written for this part. However, you have to do the following. (Max. 25 POINTS)

Details:

Display the clock in our sundevil colors with gold background color and maroon text color. Use only HEX or RBG color codes.

Also, you should display the clock in the far-right corner.

Question (3): Design an image gallery (3-5 pictures should be enough), similar to below relating to your FINAL PROJECT WEBSITE TOPIC, using some of the Image object methods and properties - You may refer to Chapter 3 Javascript PPT shared under Week 7 resources.(Max. 25 POINTS)

Javascript Assignment Week 7

var name = "Prof Usha Jagannathan"

document.write("

Hi everyone! This message is from "+name+" - Follow the instructions below to work on your Week 7 HW assignment!

")

function myfunction()

{

alert("HELLO!")

}

function myotherfunction()

{

alert("Thank you for finishing the assignment, GOODBYE!")

}

function close_window()

{

if (confirm("Close Window?"))

{

close();

}

}

function total(a,b)

{

answer = a+b

document.write("Our class student team consists of " + a + " girls and " + b + " lads: ")

return answer // you can also write it without using another variable as answer like this: return a+b

}

document.write("We are a total of " + total(6,54) + " students in this IFT301 online course! :)")

document.write("

")

// Few examples on functions shown above...

// Now, write a javascript function to find Netpay and display it on your browser to show the result. (50 POINTS)

// GROSSPAY is your (emoloyee's) wages BEFORE any deductions that include TAXES and DEDUCTIONS withheld

// The variables are the ones shown in caps above. Calcuate the Netpay using the 3 variables.

// Accept the variables from the user and do not manually enter values as shown above - You may use window prompts or a form to get the user input.

// Written a javascript code to show how to display a clock on your website

// NOTE: Your job is to display the clock in our sundevil colors with gold background color and maroon text color.

// Also, you should display the clock in the far-right corner.

// Refer to Chapter 15 in our text to recall the layout positions (25 POINTS)

function startTime()

{

var today=new Date()

var hr=today.getHours()

var min=today.getMinutes()

var sec=today.getSeconds()

var ap="AM";

//to add AM or PM after time

// Add IF statement using the above declared variables to display your clock in AM and PM

if(hr>11) ap="PM";

if(hr>12) hr=hr-12;

if(hr==0) hr=12;

//to add a zero in front of numbers

min=checkTime(min)

sec=checkTime(sec)

document.getElementById('clock').innerHTML=hr+":"+min+":"+sec+" "+ap

t=setTimeout('startTime()', 500)

}

function checkTime(i)

{

if (i

{ i="0" + i}

return i

}

// Added window prompt to call the onload event to display the time when page loads

window.onload=startTime;

//photos: will hold the filename of each image to be displayed

//photoindex: is the index of the photo, within the photos[] array, that is currently displayed

var photos = new Array();

var photoindex = 0;

//populate the photos[] array

photos[0]="IT.jpg";

photos[1]="WhyIT1.jpg";

photos[2]="WhyIT2.jpg";

photos[3]="WhyIT3.jpg";

photos[4]="WhyIT4.jpg";

photos[5]="WhyIT4a.jpg";

photos[6]="WhyIT5.jpg";

photos[7]="weloveweb.png";

photos[8]="WhyIT6.jpg";

photos[9]="WhyIT8.jpg";

photos[10]="WhyIT7.jpg";

photos[11]="ITHolidayImage.gif";

//move backward, by one, within the photos array

//check to be sure that you are not moving outside of the array bounds

function backward()

{

if (photoindex > 0)

{

document.images.p.src = photos[--photoindex];

}

}

//move forward, by one, within the photos array

//check to be sure that you are not moving outside of the array bounds

function forward()

{

if (photoindex

{

document.images.p.src = photos[++photoindex];

}

}

//go to a particular photo within the photos array

//check to be sure that you are not moving outside of the array bounds

function goto(n)

{

if (n = 0)

{

photoindex = n;

document.images.p.src = photos[photoindex];

}

}

//-->

Launch to begin with javascript coding


Enter your name:



Use this Week7Online.html file as the source. Only for question (1) specified below, the code needs to be written.

(You may turn in as two files: html and js files (OR) you may add the javascript code within the html file and submit it as one file).

Quesstion (1): Write a javascript function to find NETPAY and display it on your browser to show the result.(Max. 50 POINTS)

Details:

  • GROSSPAY is your (employee's) wages BEFORE any deductions that include TAXES and DEDUCTIONS withheld
  • The variables are the ones shown in caps above. Calcuate the Netpay using the 3 variables.
  • Accept the values for the 3 variables from the user and do not manually enter values as shown above - You need a form to do that.


For question (2) below, just add the necessary CSS properties to the digital clock to position

the clock to the top right corner in the #clock attribute that is already provided in the code.

Question (2): Javascript code is written for this part. However, you have to do the following. (Max. 25 POINTS)

Details:

  • Display the clock in our sundevil colors with gold background color and maroon text color. Use only HEX or RBG color codes.
  • Also, you should display the clock in the far-right corner.


For question (3) below, you have to replace with your own images for the image carousel and change the numbers underneath to show thumbnails instead.

Question (3): Design an image gallery (3-5 pictures should be enough), similar to below relating to your FINAL PROJECT WEBSITE TOPIC, using some of the Image object methods and properties

- You may refer to Chapter 3 Javascript PPT shared under Week 7 resources.(Max. 25 POINTS)

Details:

  • A simple image gallery
  • The

  • The >> link moves you one forward
  • The numbers allow you to go to a specfic photo
  • Featured image carousel picture roll: Why IT field is so AWESOME?

>>


Launch to end the javascript program

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!