============================================================
POSHTIK CAMPUS - LAB 4 CATCH-UP / RESCUE PACK
UI23PC510CS / UI23PC511CS - FSWD
Vasavi College of Engineering - R-23
============================================================
LAB 4 COVERS, WORD FOR WORD FROM THE OFFICIAL SYLLABUS:
Programming Exercise 4 -
"Validation of Static Website using JavaScript."
Lab 4 is PART 1 of that exercise: today your script learns to
READ the order form. Lab 5 is part 2: it learns to JUDGE the
form and refuse a bad order. Do not expect validation messages
on the page today - expect real values in the Console.
READ THIS WHOLE FILE BEFORE TOUCHING ANYTHING ELSE.
------------------------------------------------------------
1. WHAT THIS PACK IS - AND WHAT IT IS NOT
------------------------------------------------------------
This pack restores ONE thing: the exact folder that LAB 3
left behind. That folder is Lab 4's starting line.
It is an EMERGENCY BRIDGE, nothing more. It exists for
exactly three situations:
(a) your machine died / was replaced and you have no backup;
(b) you were genuinely absent for Labs 1-3
(with your instructor's knowledge);
(c) your instructor explicitly told you to use it.
It is NOT for anyone who simply skipped the earlier labs.
Labs 1-3 are where you learned to WRITE this HTML and CSS by
hand, and the exams test that on paper, with no pack to
rescue you.
TALK TO YOUR INSTRUCTOR BEFORE USING THIS PACK. No exceptions.
------------------------------------------------------------
2. STOP - THE BEST RESCUE IS NOT THIS PACK
------------------------------------------------------------
If you ever pushed your repo to GitHub (every lab since Lab 1
ends with a push), your real work is already safe. On any
machine:
git clone https://github.com/
. 3. The filename is spelt differently: Script.js or script.JS will not load. (b) "Uncaught TypeError: Cannot read properties of null (reading 'value')" getElementById found NOTHING and gave back null. Two causes, in order of likelihood: 1. the id in script.js does not exactly match the id in menu.html - check spelling AND case. cust-name is not custName. 2. your script tag is in
, so the code ran before the form existed. Move it to just before . (c) Quantity maths comes out wrong: 5 + 1 prints 51. Not a bug - a lesson. .value is ALWAYS a string, even from type="number". "5" + 1 glues, it does not add. Lab 5 fixes this with Number(). Leave it for now. ------------------------------------------------------------ 7. THE HONEST SCAR - READ THIS TWICE ------------------------------------------------------------ Your classmates' git log shows seven earned commits: 8c1f4d2 Style the menu order form <- Lab 3's exit 5b7e9a3 Style the site navigation c3e6d10 Add site-wide stylesheet 9e2a6b4 Give menu and about their semantic skeletons 2d4c8e1 Give index.html its semantic skeleton 4f9c2b1 Add order form to menu <- Lab 2's exit a1d3e07 First version of Poshtik Campus site <- Lab 1's exit Yours shows ONE rescue commit instead. That is deliberate. We do not fake history in this course - a repo's log is its autobiography, and yours honestly says "I caught up here." Your Lab 4 commit will stack on top of the rescue commit, and from Lab 5 onward your story is earned line by line like everyone else's. ------------------------------------------------------------ 8. THE DEBT - HOW TO ACTUALLY CATCH UP ------------------------------------------------------------ This pack restores FILES, not SKILLS. The skills live in the labs you missed, and every one is self-paced in Learning Mode (scroll + sliders, no presenter needed): fswd_lab_01.html - build these three pages from a blank file, and make the folder a Git repository fswd_lab_02.html - build the order form yourself (exam banker!) fswd_lab_03.html - write the 81-line stylesheet yourself Work through them this week, in the fswd-practice sandbox - nothing you do there can damage this repo. AND ONE MORE THING, THE HONEST WAY TO USE script-reference.js: build your own script.js first, compare second, and if you ever do read it before attempting, then CLOSE it and retype your version from memory. A file you only read is a file you cannot reproduce in an exam hall. Now open fswd_lab_04.html, run Part 5's starting-line checks, and build the rest yourself. ============================================================