Tim Streater wrote on 24 mrt 2006 in comp.lang.javascript
:
In article <Xn********************@194.109.133.242>,
"Evertjan." <ex**************@interxnl.net> wrote:
acord wrote on 24 mrt 2006 in comp.lang.javascript: > I tried to assign some string to document.my_form.firstname.value,
> but the text box does not display anything.
> eg.
> document.my_form.firstname.value = "Robert"
>
> in this example, the text box area does not display Robert in the
> web page.
>
>
Use:
document.forms['my_form'].elements['firstname'].value = "Robert"
Your problem could be that the form is not ready, as the above only
works when the form has been set up in the DOM.
So do it in the onload.
That could be done, Tim,
but why not [then!] just write the text in the
<input value='.....'
Look, no hands, .... eh javascript.
The OP is not clear over his intentions.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)