How to put a variable inside a textfield?

  • I am trying to insert values like:

    view.fov
    view.hlookat
    view.vlookat

    in the textfield plugin .

    HOW?

    I have tried :
    onclick="set(plugin[textfield].html,view.fov);"

    but I only get the text "view.fov" instead of the value eg: 0.123455

    please help! *cry*

    Carl

  • YES! great! that works! thanks!

    now I have another question to add to the previous one ... how do you add text around the variable? once you

    "set(plugin[textfield].html,get(view.fov));"


    it replaces all the html in the text field with the contents of view.fov ! is there any way to do a "text 1 " + view.fov + " more text" ? or a similar work around? via data maybe?


    thanks again!
    Carl

  • it replaces all the html in the text field with the contents of view.fov ! is there any way to do a "text 1 " + view.fov + " more text" ? or a similar work around? via data maybe?

    Hi,

    with 1.0.8 beta 8 and the new "txtadd(dest, txt1, txt2, txt3, ...)" action this possible,
    e.g.

    Code
    txtadd(plugin[textfield].html, 'text 1 ', get(view.fov), ' more text');

    that means:
    plugin[textfield].html = 'text 1 ' + get(view.fov) + ' more text'

    best regards,
    Klaus

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!