Sie sind nicht angemeldet.

1

Freitag, 3. Juli 2009, 01:56

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

2

Freitag, 3. Juli 2009, 19:05

Hi cmorgan,

I was looking in the forum an answer to understand your issue *cry* .... and finally I get it *attention* *g*

Quellcode

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


Hope this can help. ;-)

Salut.

3

Sonntag, 5. Juli 2009, 07:06

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

4

Sonntag, 5. Juli 2009, 11:41

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.

Quellcode

1
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