Write the HTML markup and JavaScript code

Assignment Help JAVA Programming
Reference no: EM132258096

Scripting for Design Assignment - Creating Custom Objects

ASSIGNMENT OVERVIEW: In this assignment your task is to write the HTML markup and JavaScript code to display information about the five courses in the first common semester of the Interactive Media Design and Contemporary Web Design programs.

The five courses about which information will be displayed are:

1. Web Design I (CWMD1100)

2. Digital Illustration & Imaging (CWMD1200)

3. Photography for Integrated Media (CWMD1300)

4. Design and Conceptual Process (CWMD1400)

5. Web Technologies (CWMD1500)

For each course, the following data will be displayed in the HTML page:

1. its code, name, and the number of course hours

2. a (brief) description of what the course covers

3. the 3 key skills you learned or developed in the course

4. an image of work you produced in the course

5. a caption or description of your image

The above information will be added to the page in a(n):

1. h2

2. p

3. ol with 3 li's

4. img

5. p (or other element like figcaption)

HTML element(s) respectively. In addition the course information displayed will be selected using a select element with 5 associated option elements.

All of the data about the five courses will be stored in and retrieved from one array. This array will contain 5 separate elements, one for each course. All of the data about and the actions to perform for each course will be collected together and stored in a (custom) JavaScript object. These five objects will in turn be stored as the five elements in the array.

At any one time only the information for one course is displayed. The page is updated by selecting a new course from a drop down list (created with select and option elements).

The "change" event handler on the drop down runs the JavaScript code that updates the page. Using the selectedIndex DOM property, the event handler retrieves the appropriate course object from the array and, using the object's properties and methods, updates the page.

The objects for the five courses will be created as object literals and each object will have seven (7) properties - code, name, desc, hours, skills, sampleImage, sampleDesc and one method: toString().

There is not much code in the "change" event handler - the challenge in this assignment is to create the five course objects, store them in the array, and reference them as necessary to update the page.

CODING INSTRUCTIONS:

STEP 1 - Write the HTML markup

This assignment requires the following HTML elements:

  • a select and 5 option elements to select the course
  • an h2 element to display the course code, name, and hours
  • a p element to display the course description
  • an ol with 3 li's to display skills
  • an img element to render a work sample from the course
  • a p (or other) element to display the a caption for the work image

Create an .html file and add to it these required elements and content so that it has the required content and structure, then validate your HTML.

STEP 2 - Code the JavaScript

A. Create a .js file for your JavaScript code and load it in your .html file. All the data and code required will be placed inside one function that is assigned to the window.onload event

B. Declare and create an array to store data about the five (5) courses. Each element in this array will consist of an object housing the properties and methods for one course (see next instruction).

C. Create the five course objects as literals. Use the exercises on slides 20-24 and 97-99 from the Topic 5 notes as your guide.

D. Store the objects created in step C as elements to the array from step B.

E. Attach a "change" event handler to the drop down list selecting the course.

F. In this event handler function, use the selectedIndex DOM property to determine which course was selected from the list and then use the value of this same property to retrieve the correct course object from the array.

G. Reference the selected course object's properties and methods to update the page. Make sure to use the toString() method when updating the page i.e. use the toString() method to return the string that will be used to update the h2 element.

H. Use the getElementsByTagName() DOM method to update the 3 skill li's. Use the exercise in slides 100-105 from the Topic 5 notes as your guide.

I. Also code your solution to follow these best practices:

i. no globals - all variables are declared inside the onload function

ii. use const and let to declare variables, not var

iii. all DOM elements are referenced once and stored using const.

Attachment:- Assignment Files.rar

Verified Expert

In this assignment we have design web design.Here ,we have write code for design html page.i have used css code for design html page.I have used external cascading style sheet.Another thing I have used external JavaScript functionality where I have written separate code in JavaScript file

Reference no: EM132258096

Questions Cloud

Distributed file system for a database : What are the main advantages of having a distributed file system for a database? What are the costs (disadvantages)?
What are the implications for the service providers : What are the pros and cons of these two approaches for client firms? Consider factors such as costs, availability, customization, privacy, security, etc.
Is the stock overvalued or properly valued : Once you have the basic quote, the P/E ratio is listed on a front page. Is the stock overvalued, undervalued, or properly valued? Why?
Working in a financial company : How do we ensure that only motivated individuals with specific skills end up actually working in a financial company like Freedom 55 where salary is 100 percent
Write the HTML markup and JavaScript code : CWMD2601 - Scripting for Design Assignment - Creating Custom Objects, Durham College, Canada. Write the HTML markup and JavaScript code
What type of competitive advantage : What type of competitive advantage is Panera Bread trying to achieve?
Corporate social responsibility and sustainability practices : Why are MNCs getting involved in corporate social responsibility and sustainability practices?
What are the teachings and moral aspects of buddhism : An explanation of the basic teachings and moral aspects of Buddhism, including the three marks of reality, the Four Noble Truths, and the Noble Eightfold Path.
Provide the organization with a competitive advantage : How does the management of the pipeline provide the organization with a competitive advantage?

Reviews

len2258096

3/16/2019 2:00:14 AM

MARKING - Marked out of 100 (80 for function, 10 for style, and 10 for documentation). Full marks given only if your solution: meets all of the requirements, has no runtime errors, follows all of the course coding conventions, uses only the JavaScript and DOM capabilities covered to this point in the course i.e. no JS libraries and uses external JavaScript and is submitted as a single zipped folder with all required files. SUBMITTING - Upload your work using the correct drop box in DC Connect. Only work submitted through DC Connect will be marked. Upload all required files (i.e. .html, .css, .js, and images) as one zipped folder.

len2258096

3/16/2019 2:00:07 AM

NOTE: The data displayed in your solution must be relevant to and reflective of the actual courses from Semester 1 – there are to be no “place holders”. 40% of the grade in this assignment will be based on creating the objects using actual, relevant data that is based on your experience and work in the course. See me to determine alternatives if you did not take one or more of these courses in the first semester.

len2258096

3/16/2019 2:00:01 AM

MARKING SCHEME: The marking breakdown for this assignment is as follows: 5 course objects created using relevant and appropriate data that applies to each course and your experience in it i.e. no place holders - 40%. All course objects are stored in and retrieved from an array - 10%. Only course object properties and methods used to update page - 20%. The getElementsByTagName method used to retrieve and update the li elements that contain the skills acquired - 20% and best practices followed - 10%.

len2258096

3/16/2019 1:59:52 AM

REMEMBER, TO AVOID LOSING MARKS UNNECESSARILY - Only use JavaScript and DOM capabilities that have been covered to this point in the course to complete the assignment. Do not use any JavaScript libraries or frameworks such as jQuery. Always test your program with a variety of input values to ensure that it is working correctly i.e. has no syntax errors and produces the expected results. Add opening comments to identify yourself as the programmer and explain the purpose of your program. Add comments to document your code. View your source in Firefox before submitting to make sure that the indentation and white space are correct, and that horizontal scrolling is not required. Load all JavaScript code from one external file and submit all of the files used in the solution as one zipped folder. As the very last thing you do before submitting, test your program one more time and check the Console to ensure it is error free.

len2258096

3/16/2019 1:59:46 AM

NOTE: In general, the CSS or presentation of your solution (colors, fonts, margins, etc.) is at your discretion and does not usually contribute to your mark in the assignment. Your objective is to code the JavaScript statements to produce the required structure, content, and especially the behavior.

Write a Review

JAVA Programming Questions & Answers

  Create a small networked chat application

Create a small, networked chat application that is populated by bots - They copy each others messages, and have a remarkable level of variety in the number

  Algorithm for evaluating postfix expressions

Should you find it convenient, you may also assume that X1 is the first character on the line, and that each Xi is separated from the next by exactly one space

  Create a version of the dice game pig that a user can play

Create a version of the dice game Pig that a user can play against the computer. The object of the game is to be the first to score 100 points.

  Create a class called numberset

You need to create a class called NumberSet.  It needs an empty default constructor and an overloaded constructor that takes an integer argument and creates a vector with that many random numbers in it.  So... if I created

  Write a method which reverses the order of items

Write a method static void reverse (List l) which reverses the order of items stored in the list. Again, make sure it works for any special cases you can think of - write a series of statements to create several AList and/or LList objects (of typ..

  Define a class named teacher that is derived from person

Define a class named Teacher that is derived from Person. This class should contain instance variables for the subject name and salary.

  How many parameters are supposed to be passed

How many parameters are supposed to be passed to the constructor or how big to create the array - Method Union comparing two different objects?

  Create your java source file with the public class

Create your Java source file with the public class and main() method (like homework 1). In the main() method, add code to prompt for the input line, read in the line of input, and print it out.

  Concept of web based information system

Design and implement a simple and small email server using the concept of web based information system

  Explain creational design pattern

Explain Creational Design Pattern. Select a type of Creational Design Pattern, explain why you selected that particular pattern type

  Create a RESTful service to perform CRUD operations

COMP-303 Java EE Programming Assignment - RESTful Service and Client with JSON, Centennial College, Canada. Create a RESTful service to perform CRUD operations

  Creates pet objects from data read from the keyboard

The assignment is to write a program that creates Pet objects from data read from the keyboard. Store these objects into an instance of ArrayList.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd