Day 7 Task 01 Connect features

Task 01. Connect Features (Feature Integration)

Map JavaScript events to static HTML screen elements and save and connect data to storage.

Task 01 Task 01 Connect Features Lab Guide

📥 Lab input

  • • day7_meeting_notes.md (meeting notes)

💾 Lab output

  • • day7_connected_feature.html

1. Story and lab background

A junior planner finished prototypes of the login screen and booking list. But in the meeting, when the CEO pressed the login button, nothing happened — just a static screen. Hearing "The screens look nice, but clicking doesn't move to the next one. When will saving real booking data and storing member info in the session be connected?", they realized the work of tying screens to data logic was urgent.

In this lab, you'll use Codex AI to attach event listeners (Click, Submit Event) to a static login form and booking card component, and tie in a data store (Local Storage, etc.) and mock API calls so the screen properly responds to clicks and saves data.

2. Learning goals

  • Connect HTML elements and JavaScript events (Event Listener) properly.
  • Collect data users enter in forms and save it to a mock API or storage.
  • Use AI's suggestions to fill in missing exception event handling steps while connecting features.

🛠️ Follow-along lab guide

  1. Create the lab file: press the download button below and save day7_meeting_notes.md in the automation/ folder.
  2. Hand feature assembly to Codex: send the **Codex request prompt** below in the Codex Client prompt box to ask for logic integration.
  3. Check data saving: see that the browser message shows correctly when sign-up finishes, and check in developer tools under Application -> LocalStorage that the input is saved correctly.

Download lab materials

Codex request prompt

Task 01 Prompt
I want to connect JavaScript features to the sign-up screen code in the provided day7_unconnected_feature.html. Write a script that 1) validates input when the sign-up button is clicked, 2) saves the info in browser local storage, and 3) moves to the dashboard screen on success. Also suggest the missing cancel button behavior and duplicate sign-up check logic.

4. Example output

Codex analyzes the meeting notes and outputs a normalized data entity mapping and Mermaid ERD script like below.

FileRoleMain componentsStorage format
day7_connected_feature.htmlHandle and validate sign-up form submitsignup-form, submit-btnLocalStorage (JSON format)

5. AI use points

  • Behavior flow guide: lays out as a step-by-step algorithm the state changes happening in the browser background when a button is pressed.
  • Extra branch detection: suggests 'validation' checks in advance, not just for sign-up success but cases like a user rapidly pressing submit with empty fields.