Objects Models Miscellanous JQuery

Part 1: Creating Interactive User Experience

In this assignment, we utilized key elements of JavaScript to create a dynamic and interactive user experience. First, we used DOM manipulation to access and modify the HTML elements, specifically targeting the main or div area with document.getElementById() and applying styles dynamically through the style property.

To enable interactivity, we implemented event handling by attaching a change event listener to the form. This allowed us to detect user actions, such as selecting radio buttons, toggling checkboxes, or choosing a font size from the dropdown menu. Conditionals were used to determine which element was being interacted with and to apply or remove styles accordingly. For instance, if a checkbox was unchecked, the corresponding style (e.g., bold, italic, underline) was removed.

This seamless combination of DOM manipulation, event handling, and logic enabled the webpage to respond immediately to user input, providing a fluid and intuitive interaction experience.

Please see this assignment Below


Part 2: String Manupilation and Search Operations

So in this assignment we tasked with building a tool that could search and calculate the number of occurances of spefic letter or number in the text.

The user can type or paste some string of data and the script should be able to search the inputed data using ChartAt()requiring manuel iteration character by character


Part 3: Validation with Strict Formats

Lastly Part 3 of this assigment focuses on input validation with a strict format like a phone number

The primary javascript object used is RegExp for validation and form handling.

The gist of this validator is simply this that once the user inputs a phone number, the script should validate the user input to using regular expression to a specific format of entry.

If the format matches then the a success message is displayed and if it does not then an error message is displayped.