Page 1 of 1

Easy Javascript

Posted: Sun Dec 02, 2012 8:52 pm
by Nathan Kahl

I cannot figure out how to append text to a field using javascript. My field name is inputFirst and I want append @google.com on a value change event. I cannot figure it out. Any ideas?


Easy Javascript

Posted: Sun Dec 02, 2012 9:38 pm
by Eric5020946

var input_val = tiggzi('name-of-input').val();
tiggzi('name-of-input').val(input_val + "@google.com");

try this


Easy Javascript

Posted: Mon Dec 03, 2012 12:51 am
by Nathan Kahl

That gets me closer. This is what i have right now...

var input_val = Tiggzi('inputFirst');
Tiggzi('inputFirst').val(input_val+"@google.com");

and i get "[object Object]@google.com"

Any ideas?


Easy Javascript

Posted: Mon Dec 03, 2012 1:04 am
by Nathan Kahl

I forgot the .val on the first line. it works! Thanks so much for your help!