Signed in as:
Sign out
Links
Creating Websites home
Beginnings
Introduction to the Web
Introducing HTML
Marking up text
Setting Up
FTP and FileZilla
Links and anchors
Getting some style
Intermediate topics
Style sheets
Testing and debugging
Lists
Images and maps
Audio and video
Intro to JavaScript
The DOM and scripting
Logic and Arrays
Functions and document.write
Forms and INPUT
Other controls
Cookies
HTML tables
Structuring tables
Scripting w/ tables
Inline frames
Loose ends
Support
Here we build on our knowledge of forms and controls and we include a number of other controls. Then we describe DOM characteristics and JavaScript techniques for working with forms and controls. Topics include:
Note: I strongly suggest you view all our videos in full screen mode: click the icon in the lower right corner of the video area (it shows four arrows pointing to the corners of the screen). When you are done, the Esc ("escape") key returns you to regular mode.
Lesson 18: Those Other Controls
Part 1: "Select" and related controls
Hands on exercise
This exercise is primarily focused on <select>, <option>, and <optgroup> elements,
along with the related DOM properties and methods.
We'll be working with the DTECafe-local.html and DTECafe-remote.html files, found in your MyWebFiles directory.
We'll start with the style sheet. Open your editor and code the following style rules then save the result as 'selectStyles.css':
If you have a remote server, upload selectStyles.css to your server, then, in either case, run some tests:
Test both DTECafe-local.html and DTECafe-remote.html pages work; we did not demonstrate what happens when
you submit the forms, so you should make some selections and submit the form
for both pages.
Next, replace the submit and reset buttons with 'button' elements.
The submit button should have a type of 'submit', a class of 'up', and include
an 'img' with 'src' of "Thumbs-up.jpg", and the reset button should have a type
of 'reset', a class of 'down', and include an 'img' with 'src' of "Thumbs-down.jpg".
Test the 'button' elements work the same as the earlier buttons.
Session 2
In this video, we explore additional types of controls. Topics include:
Lesson 18: Those other controls
part 2: TEXTAREA, FIELDSET, LEGEND
Hands on exercise
This exercise is focused on putting together many of the controls discussed so far.
Create an HTML page named 'formss.html' that helps the user to submit an application for a Nobel Prize, using a form and some controls.
The page should reference the style sheet 'formStyle.css' (which is already supplied).
Start with an 'h1' element with text "Application For Nobel Prize"
Follow with an 'h2' element with instructions to
fill in all fields then
click on the SUBMIT APPLICATION button
Then the form, which should use a method of 'post' and an action of 'cgis/simple_cgi_post.php'.
(Reminder: only controls with a 'name=' attribute have their value sent to the CGI).
The form should include:
Test that your form works. If you are able to upload the page to a server, check that the results are what you expected. If you don't have a server to upload to, you might try constructing a function similar to the 'showBill()' function in the DTECafe-local.html page (a bit of a challenge, but you should be able to do it by now).
Supplemental materials
A cumulative summary of the contents of the course so far:
Click here for the cumulative technical summary
back list forward
Email us if you would like additional information. We would love to see your comments and recommendations for our site.
Our privacy policy: we use cookies to keep track of where you are on the site, but we do not leave cookies on your site; we do not track your visits; we do not disseminate any information about you because we do not gather any information about you.