Text Area form control - Change Label value from Javascript

評論

4 條評論

  • Avatar
    Tobias

    Hi Loïc

    Yes it is. Try this:

    $('[controlholdername="TextArea1"]').find("span")[0].textContent="My new Label";

    TextArea1 is the internal name of your Text Area Control.

    Regards,
    Tobias

    0
    評論操作 永久連結
  • Avatar
    CAAE

    Hi Tobias,

    I'm doing a test with a text area control and it doesn't work.

    I have the following syntax in JS:  $('[controlholdername="IndicarActividadSub"]').find("span")[0].textContent="My new Label";

    IndicarActividadSub -> is the internal name

    I get error in console Cannot set properties of undefined (setting 'textContent'

    If I do console.log($('[controlholdername="IndicarActividadSub"]').find("span")[0]);  a mark undefined.

     

    Attached textArea structure

     

    Thnks 

    Dani Oliva

    0
    評論操作 永久連結
  • Avatar
    Loïc Lecomte

    Hello Tobias, Dani,

    Tobias solution work for me, thanks :)

    0
    評論操作 永久連結
  • Avatar
    Tobias

    Hi Dani Oliva

    What AgilePoint Version do you use? Is it possible to share your example?

    0
    評論操作 永久連結

登入寫評論。