I have a widget editBox defined as
Expand|Select|Wrap|Line Numbers
- <div data-widgetType="EditBox"
- id="searchword"
- data-width="FILL_AVAILABLE_SPACE"
- data-text=""data-fontSize="26">
- </div>
Expand|Select|Wrap|Line Numbers
- function getEntry(){
- var word2="";
- var searchtextctrl=document.getNativeElementById("searchword");
- //read its text property now then save it to word2 var
- searchtextctrl.getProperty("text",
- function(property,value)
- {
- word2=value;
- },
- function()
- {
- word2="";
- }
- );
- }
- //if (!word2) { //tried as well (word=="")
- //no entry
- }