Highlighted

Concatenating Textfields with buttonclick and Javascript

Avatar

29-01-2009

Hi,I´ve tried to create a simple example with three textfields. I wan´t to write two texts (givenName and surName) that puts the string value in the third field when I click on a button. How can I access the stringvalue in designer? I place the script on the button and click event but can´t get it to work. How can the script look like? What method can I use that work? I´ve tried rawValue, value and toString but don´t get it to work.



I would be very thankful for some help.



Rikard

Replies

Highlighted

Avatar

Avatar

pguerett

Total Posts

7.7K

Likes

611

Correct Answer

692

Avatar

pguerett

Total Posts

7.7K

Likes

611

Correct Answer

692
pguerett

29-01-2009

I prefer to write my code in javascript so here it is. Lets assume your fields are called FName, LName and Name.



On the calculate event of the Name field enter this code:



Name.rawValue = FName.rawValue + " " + LName.rawValue;