OLPCities/Form: Difference between revisions

From OLPC
Jump to navigation Jump to search
No edit summary
No edit summary
 
(4 intermediate revisions by 2 users not shown)
Line 11: Line 11:
==Properties==
==Properties==
<pre>
<pre>
(object of the Class TextBox ) Normaly we have a chain of objects/propeties, because a property of the
(object of the Class TextBox ) Normaly we have a chain of objects/propeties. By example: a property of the
Class TextBox can be "value".
Class TextBox can be "value".
By example: we can capture what was typed at a textbox with:
We can capture what was typed at a textbox with:
document.form1.tb1.value
document.form1.tb1.value. Read the reference of the Class TextBox.


(object of the Class Button) Read the reference of the Class Button


</pre>


(object of the Class TextArea) Read the reference of the Class TextArea
Link to the Classes [[TextBox]]

(object of the Class CheckBox) Read the reference of the Class CheckBox

(object of the Class RadioBox) Read the reference of the Class RadioBox


(object of the Class ListBox) Read the reference of the Class ListBox


</pre>


Link to the Classes [[OLPCities/TextBox|TextBox]] [[OLPCities/Button|Button]] [[OLPCities/TextArea|TextArea]] [[OLPCities/CheckBox|CheckBox]] [[OLPCities/RadioBox|RadioBox]] [[OLPCities/ListBox|ListBox]]
[[Category:OLPCities]]
[[Category:OLPCities_JavaScript_Libraries]]

Latest revision as of 23:40, 13 February 2007

"Form" is a Class that is part of the DOM (Document Object Model). This "library" is referenced automaticaly by the browser of the OLPC station and you don't need to add anything in the program to use it.


To create an object of the Class you will use the tag FORM defining a NAME. You need to close the tag. Something like:

<form name = form1>
...

</form>

Properties

(object of the Class TextBox )  Normaly we have a chain of objects/propeties. By example: a property of the 
                                 Class TextBox can be  "value". 
                                We can capture what was typed at a textbox  with:
                                 document.form1.tb1.value. Read the reference of the Class TextBox.

(object of the Class Button)     Read the reference of the Class Button


(object of the Class TextArea)     Read the reference of the Class TextArea

(object of the Class CheckBox)     Read the reference of the Class CheckBox

(object of the Class RadioBox)     Read the reference of the Class RadioBox


(object of the Class ListBox)     Read the reference of the Class ListBox


Link to the Classes TextBox Button TextArea CheckBox RadioBox ListBox