OLPCities/TextBox: Difference between revisions

From OLPC
Jump to navigation Jump to search
No edit summary
No edit summary
Line 5: Line 5:
To create an object of the Class you will use the <b>tag</b> INPUT defining a TYPE=TEXT, NAME and a SIZE . Something like:
To create an object of the Class you will use the <b>tag</b> INPUT defining a TYPE=TEXT, NAME and a SIZE . Something like:
<pre>
<pre>
<input type=text name = tb1>
<input type=text name=tb1>
</pre>
</pre>



Revision as of 17:12, 26 September 2006

"TextBox" 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.

We are now (sept 2006) doing tests to verify all the methods and properties of this Class that is working OK with the OLPC station. So, we have only a few elements presented here.

To create an object of the Class you will use the tag INPUT defining a TYPE=TEXT, NAME and a SIZE . Something like:

<input type=text  name=tb1>

Properties

value                            The String inside the text box.
                                 By example: we can capture what was typed at a textbox  with:
                                 document.form1.tb1.value


Link to the Classes:Document Form