facebook

Resize dynamically textarea

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #342499 Reply

    lemorlenny
    Member

    Hi
    I have 2 textarea that I fill dynamically from a database, I would like resizing and repositioning these in according to its content.
    I tried to insert in a panel or adding in css the “resize:vertical;” clause. I tried to retrieve the height in px or in line number and modify the box height without success.
    I found some articles about how do this in HTML5 and jQuery but I’m not able to implement it.

    Some suggest?

    Regards.

    Attachments:
    You must be logged in to view attached files.
    #342565 Reply

    Hi lemorlenny,

    I am not aware of a way to achieve this. I’ve escalated your question to the dev team, in the meantime you can take a look at this tutorial and see if it can meet your requirement: http://www.genuitec.com/support-genuitec/viewtopic.php?f=14&t=5264

    #342574 Reply

    lemorlenny
    Member

    @support-octavio wrote:

    Hi lemorlenny,

    I am not aware of a way to achieve this. I’ve escalated your question to the dev team, in the meantime you can take a look at this tutorial and see if it can meet your requirement: http://www.genuitec.com/support-genuitec/viewtopic.php?f=14&t=5264

    Thanks for your reply,
    I’m trying to change approach using html with sliding div like the accordion behaviour.

    Regards

    #342576 Reply

    Proffie
    Member

    hi lemorlenny,
    could you share a little more, what you tried already?
    Did you use anything like in the dynamic list samples:

     var panelHt = 30 + itemCnt * 44;
      $('#m1-<yourpage>-panel1-scroller').attr('data-layout-content-height', panelHt);
      phoneui.preprocessDOM('#m1-<yourpage>');

    or similar to add the height attribute to the textfield ?

    #342580 Reply

    Proffie
    Member

    Hi lemorlenny,
    I tried some around and found that
    the following code works for changing the height of your text area:

    $('#m1-textarearesize-textArea1').height(panelHt);

    If you can determine the size of the variable: panelHt by some formula from your database (like length divided by box size), it should at least work here.

    #342582 Reply

    Proffie
    Member
    $('#m1-textarearezise-textArea1').offset({top: <new offset value> });

    works for moving the textarea box up or down.

    #342585 Reply

    lemorlenny
    Member

    @Proffie wrote:

    $('#m1-textarearezise-textArea1').offset({top: <new offset value> });

    works for moving the textarea box up or down.

    Many thanks Proffie for your suggest, now I working on it and reply ASAP.

    Regards

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: Resize dynamically textarea

You must be logged in to post in the forum log in