Skip to main content

form widgets

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

Popular posts from this blog

Micro-Service with mind-map

  If we were to give a definition to micro service, what will it be? A simple one is an architectural style, that functionally decomposes an application into a set of services, each service has a focused, cohesive set of responsibilities. Similar to most, it has to have some properties & practices, which we can categorize to a general ones and detailed ones “12-factors”.  Away from the 12 factor, Some general practice that be considered while decomposing a services:  Loosely coupled: minimum communication between Services. Cohesion: elements that are tightly related to each other and change together should stay together "Common Closure Principle (CCP)". Single responsibility principal (SRP): every micro-service should do one thing and do it exceptionally. When constructing an application or defining its architecture, we follow below three-step process: Identifying the system operations, functional requirement, which are the user stories and their associated user scena...

Not all Ps sting

  If someone meant to say Ps and pronounce it Bees. would this confuse you :). Ps is for the P that is the start of Properties and Practice Each application should have some properties and follow certain practices. Properties: Below are 5 properties we should try to have in our application with a small description of how to include them Scalable, Scale => Increase workload (horizontally scaling) Statless, no state should be shared among different application instances,  Concurrency, concurrent processing = Threads. Loosely coupled, decompose the system into modules, each has minimal dependencies on each other "modularization", encapsulating code that changes together "High cohesion".  API first, Interfaces, implementation can be changed without affecting other application. favor distribution of work across different teams.  Backing Services, "DB, SMTP, FTP ..." , treating them as attached resources, meaning they can easily be changed. Manageable, changi...

regex

Regular expressions are a kind of language within a language, designed to help programmers with their searching task. in general, a regex search runs from left to right, and once a source's character has been used in match, it can't be reused. metacharacter: \d  digit \s  white space  \w word character (letter, digit or "_") [a-f] range from a to f  [a-fA-F]  looking for the occurrences of a-f or A-f not fA combination ^ to negate the character specified nested brackets  to create a union set && to specify intersection of a set quantifiers "allows to specify number of occurrences to match against " +  one or more *  zero or more ?  zero or one greedy: read first the whole string, if no match, move backward character by character till a match is found. reluctant , however, take the opposite approach: They start at the beginning of the input string,...