Page 1 of 1

Issue while appending text of a button to the text in a text box

Posted: Wed Mar 05, 2014 12:04 pm
by manjusha ramakrishnan

Hi. I am trying to append the text of a button to the existing text in a text box. To do this I used the "Run Javascript" action on the button click event. The code I added is as follows:

Appery('mobiletextinput_50').val(Appery('mobiletextinput_50').val() + Appery('mobilebutton_26').text());

The two texts get appended however there seems to be unwanted spaced as line breaks between them which makes them appear in two lines instead of one. I tried using the trim() as well as a regular expression to remove these spaces but it was still of no avail. Could somebody please help me with this..


Issue while appending text of a button to the text in a text box

Posted: Wed Mar 05, 2014 12:17 pm
by Nikita

Hi Manjusha,

I've tried this code: Appery('mobiletextinput_50').val(Appery('mobiletextinput_50').val().trim() + Appery('mobilebutton_26').text().trim());
And text was appended without any spaces.


Issue while appending text of a button to the text in a text box

Posted: Thu Mar 06, 2014 7:45 am
by manjusha ramakrishnan

thanks a bunch nikita.. this worked just perfect.. :)