DHTML
Part
4 - Forms and Meta Tags
FORMS
Forms can have two basic methods, "get" and
"post". Post is for sending information, possibly to
a database or perl/cgi script for processing. Get is for queries and
requests made to databases and search engines. By default,
each form will have a clear and submit button. There are a
host of labels, text boxes, check boxes, drop-down lists and radio
buttons that can be used with forms. Read the source and
assimilate!
Example:
<form method = "post" action = "mailto:cgermany@networkingprogramming.com">
<p>
<input type = "hidden" name = "recipient"
value = "http://www.networkingprogramming.com/traveler" />
<input type = "hidden" name = "subject"
value = "Feedback Form" />
<input type = "hidden" name = "redirect"
value = "index.html" />
</p>
<p><label>Name:
<input name = "name" type = "text" size = "25" />
</label></p>
<p><label>Comments:<br />
<textarea name = "comments" rows = "4"
cols = "36"></textarea>
</label></p>
<p><label>E-mail:
<input name = "email" type = "password"
size = "25" /></label></p>
<p>
<strong>I Like:</strong><br />
<label>Long Hairs <input name = "thingsliked" type = "checkbox"
value = "Design" /></label> <label>Short Hairs <input name = "thingsliked" type = "checkbox"
value = "Links" /></label> <label>No Hairs <input name = "thingsliked" type = "checkbox"
value = "Ease" /></label> <label>Medium Hairs <input name = "thingsliked" type = "checkbox"
value = "Images" /></label> <label>I don't like cats, I like
dogs <input name = "thingsliked" type = "checkbox"
value = "Code" /></label>
</p>
<!-- <input type = "radio" /> creates a radio -->
<!-- button. The difference between radio buttons -->
<!-- and checkboxes is that only one radio button -->
<!-- in a group can be selected. -->
<p>
<strong>How did you get toSunshine's site?:</strong><br />
<label>Altavista.com
<input name = "howtosite" type = "radio"
value = "search engine" checked = "checked" /> Dogpile.com <input name = "howtosite" type = "radio"
value = "link" /></label>
<label>Traveler
<input name = "howtosite" type = "radio"
value = "deitel.com" /></label> <label>Yahoo.com <input name = "howtosite" type = "radio"
value = "book" /></label> <label>Astalavista.com <input name = "howtosite" type = "radio"
value = "other" /></label>
</p>
<p>
<label>Can you guess what he likes? Sunshine's favorite food is:
<!-- the <select> tag presents a drop-down -->
<!-- list with choices indicated by the -->
<!-- <option> tags -->
<select name = "feedSunshine">
<option selected = "selected">Amazing</option>
<option>Purina Cat Chow</option>
<option>Liver</option>
<option>Fish Treats</option>
<option>Salmon</option>
<option>Tuna</option>
<option>Rat Poison</option>
<option>Mice</option>
<option>Bugs</option>
<option>Cat Nip</option>
<option>His Own Hairballs</option>
<option>Lizards</option>
</select>
</label>
</p>
<p>
<input type = "submit" value =
"Submit Sunshine Survey" />
<input type = "reset" value = "Clear Sunshine Survey" />
</p>
</form>
Will produce the following form:
META TAGS
META TAGS, though covered last, are actually the most
important part of your web pages. They are necessary for you
to be spidered by the search engines correctly. They include
key words and content so that your pages, once indexed, can be found
on the web.
Example:
<html>
<head>
<title>Traveler, MIDI, Music, Programming
Tutorials</title>
<META name="description"
content="Christian, Music, MIDI, Programming, Tutorials,
Stories, Poems, Songs, Lyrics">
<META name="keywords" content="Christian, Music,
MIDI, Programming, Tutorials, Stories, Poems, Songs, Lyrics,
Traveler">
<META name="author"
content="Charles Germany">
</head>
<body>
</body>
</html>
DHTML 1 DHTML
2
Home
DHTML 4
Example
|