Aah..
I got it.
changed last line in the function from
document.forms.browse.box.value = value;
to
box.value = value;
(this is practically my 2nd day with js - so please excuse the naivete)
Thanks
oh - and I also realized my mistake in the1st line in the function
var box = document.forms.browse.boxid;
and changed it to
var box = document.getElementById(boxid);
Any help is appreciated
Thanks
Thanks Vacunita, feherke
I got it working for hardcoded "box2" in the function, but when I pass box id as a parameter to the function, it gives me an error
-----
document.forms.browse.box is undefined document.forms.browse.box.value = value;
-----
Here is my new simplified code..
<!DOCTYPE...
I am trying to autofill a box by clicking a link (with return false). The function to autofill works with button tag but not in anchor tag - instead of returning false, the click event transitions to the href.
Here is the simplified code. Any help is appreciated.Thanks
<!DOCTYPE html...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.