I'm trying to use a variable to write to a textbox and I can't seem to nail the syntax. I've tried searching but I couldn't find anything (probably because I don't know what exactly to search for).
document.fast.textbox1.value=23;
works fine.
however,
variable = textbox1;
document.fast.variable.value=23;
does not.
I've tried several different variations of adding braces, brackets and quotes, but I can't seem to nail it. I'm using JavaScript to auto populate textBoxes in a PHP form. My JavaScript knowledge is extremely limited.
Thanks for your help
-Kevin


Reply With Quote

Bookmarks