.Script & Form Elements

Anonymous
timer Asked: Dec 13th, 2017
account_balance_wallet $10

Question description

Script & Form Elements

Add a script element to the document head that loads the cg_script.js file.

Scroll down to the section element and insert a web form element that employs the action athttp://www.example.com/cg/register via the post method.

Add the labels and input boxes shown previously in the figure in the Introduction step and described in the figure below. Place the input boxes directly after the labels and associate each label with its input box control. You do not need to enclose the label and inputelements with div elements.

Figure 7-62

(To view a larger version of the image, right click it and select "View in a New Tab")

Data List

Create a data list named titleListcontaining the suggestions: Mr., Mrs., Ms., Prof., Dr., Assist. Prof., and Assoc. Prof. Apply the titleList data list to the titleBox control.

Regex

Apply the regular expression pattern ^\d{10}$|^(\(\d{3}\)\s*)?\d{3}[\s-]?\d{4}$to the phoneNumber field. Apply the regular expression pattern ^acgip\-\d{6}$to the acgipID field. (Note: You can copy the regular expression code for the phoneNumber field from the cg_regex.txt file.)

Selection List

Add the Registration Category label associated with the regList control. Add a selection list with the ID regList that stores values in the registerType field. Populate the selection list with the option text: “ACGIP Member ($695)”, “Non-Member ($795)”, “Student ($310)”, “Poster ($95)”, and “Guest ($35)”. Make the corresponding option values equal to “member”, “nonmember”, “student”, “poster”, and “guest”.

Submit Button

Within the form, add a paragraph containing a submit button with the text continue.

Instructions

Complete the Script & Form Elements step described above.

Complete the Data List step described above.

Complete the Regex step described above.

Complete the Selection List step described above.

Complete the Submit Button step described above.




Return to the cg_validate.css file to create styles for validating data entry.

Validation Style Rule

Within the Validation Style section, add the following style rules:

  • Display all input, select, and textarea elements that have the focus with a background color of rgb(245, 245, 140).
  • When the fnBox, lnBox, addBox, mailBox, phoneBox, and idBox controls have the focus and are valid, change the background color to rgb(220, 255, 220) and display the cg_valid.png image with no tiling in the right side of the background contained within the box.
  • When the fnBox, lnBox, addBox, mailBox, phoneBox, and idBox controls have the focus and are not valid, change the background color to rgb(255, 232, 232) and display the image cg_invalid.png with no tiling in the right side of the background contained within the box.

CSS Styles

  • Introduction
  • HTML Elements
  • CSS Styles
  • Wrapping Up

Tutor Answer

eCePanos
School: Carnegie Mellon University

He...

flag Report DMCA
Review

Anonymous
Goes above and beyond expectations !

Similar Questions
Hot Questions
Related Tags

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors