I often when i start studying new material, and stop looking back for the old one, sometimes I lose the sentence structure, so why not documenting it
form controls "widgets":
don't forget setting any name to be used for retrieving data back at the server side
- sending data
- single data using input tag with its type attribute set to text, password, radio or hidden, or with a select tag.
- multiple choice data, as if sending an array use also input tag with its type attribute set to checkbox or radio, or use select tag mentioning its multiple attribute
- executing events
- using input tag with its type attribute set to submit, reset, button
<input type=" " name=" " />
type: text, password, hidden ....
<select name="countries" size="2" multiple>
<option value="fr"> France </option>
<option value="en"> England </option>
<option value="eg">Egypt</option>
</select>
style is either a pop-up menu or scroll-able list
<textarea name="dialog" rows="5" cols="35"> paragraph </textarea>
<input type="radio" name="volume" value="h" checked="checked" /> high
<input type="radio" name="volume" value="m" checked /> medium
<input type="radio" name="volume" value="l" /> low
last one marked as checked take precedence, and yes can just write checked
<input type="checkbox" name="hobbies" value="read" checked="checked" /> reading
<input type="checkbox" name="hobbies" value="walk" checked="checked" /> walking
<input type="checkbox" name="hobbies" value="watch" /> watching movies
passed to the server in the from hobbies=reading&hobbies=walking
Comments
Post a Comment