Results 1 to 8 of 8
  1.    #1  
    In searching how to re set the value of a textField to "", i found another forum post with the following code:


    Using ares, it clears the textField and returns it to the hint text but still holds a value of what was there previously, what gives?
  2. #2  
    You have to set the model.value for that textfield to "" too.
    WOG Dev - WebOS Group
    PMP Dev -
    Apps: WOG O.S.K., WOG Card Keeper, WOG Glowstick, WOG Kid Protect, PreLoad, PimpMySounds
  3. #3  
    as mentioned you must reset the model value to "", you are only updating the html when you use .update
    the correct way is to clear the model and use modelchanged the the focus but you can also clear model, update the html and the focus
  4.    #4  
    Good stuff! Thanks!
    Last edited by jimbohsp; 05/05/2010 at 10:23 AM.
  5.    #5  
    Actually, my bad.. The code I used was:


    I'm pretty confused, what code would I use to reset the model value to "" and in what context do I use modelChanged? This code is in a button's tap function, a clear button to clear all my text fields.

    Thanks again for the help!
  6. #6  
    did you bind it to specific model like the ones in the example?

    such as
    this.model = {
    'original': '',
    disabled: false
    this.controller.setupWidget('textfield1', this.textattributes, this.model);

    in .setup

    if so, clear the model first.

    this.model['original'] = '';
  7.    #7  
    does it make any difference that I'm using Ares?
  8.    #8  
    Figured it out! After a bit of searching around palm developer forums, I found that this function works:


    It seems to me that Ares sets up widgets in its own way aside from this.setupWidget, would it be correct of me to assume? Also, could anyone explain to me what the this.$ identifier means or point me to the correct documentation that could explain in some detail? I've dabbled in programming over the years (HTML and Visual Basic mostly haha), I would like to actually learn something for what it is rather than keep on doing trial and error.

Posting Permissions