Create a web page with the heading CIS 114 Homework 7 - Object Model, Cookies.

You should have two links on the page of Homework 7 respectively to Part 1 and Part 2 as described below:

Part 1:

Create a webpage in which users are allowed to select a page layout and formatting through the use of the className property. Choose at least three form elements such as: radio buttons, select items, checkboxes, and buttons to allow the user to change some CSS property of the page - for example: a group of radio buttons for the user to select background color, a select item for the user to select font size or group of font family, a group of checkboxes where the user can select italic (font style), bold (font weight), etc.

Attention! Remember that certain styles cannot be applied at the same time! For example, it is not possible to offer a group of checkboxes for the user to select different font-sizes as you will not be able to apply all the choices the user can make with a group of checkboxes (in a group of checkboxes the user can select more than one option, right?). So, for this type of style, you could use a group of radio buttons (in a group of radio buttons, the user can only select one option, right?)

You should not ignore any of the choices made by the user which means that once a choice is made, it should remain active on the page or the area selected to apply the changes. The choice should be applied when the choice is made! For example, if you give radio buttons for the background color, such as: cyan, light green, or orange and the user chooses orange, the orange background should be applied immediately! Then, after that choice, if in another option you give checkboxes for the user to choose font bold, and/or font italic and the user selects both checkboxes, then the page should maintain the background color chosen from the radio button and apply the new styles (bold font and italicized font) as well, etc.

In case of checkboxes, if the user uncheck the mark of a checkbox, the style that was unchecked should be removed from the page or area selected!

Part 2:

Write a script that will save two cookies for the same page - one for the name of the user and another one for the username of the user. Both cookies should be deleted when the user closes the browser.

If it is the first time the user is opening the page on the browser, you will present a form for the user to type his/her name and his/her username. If the user is revisiting the page while the browser is still opened, you will just display a message of Welcome Back followed by the name of the user that you will retrieve from the cookie previously saved.

Nothing should be presented using alert boxes and no request should be made using a prompt box!

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.