Trouble changing the value of an input

This works fine to change an input:

Code:

document.theform.f10.value = 'test';

But the input that gets changed needs to be based on a variable in the function. So, it needs to work like this:

Code:

var input = "f10";
document.theform.input.value = 'test';


But I can’t get it to work.

Any advice?

View full post on Tycoon Talk

, , ,

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Get Adobe Flash playerPlugin by wpburn.com wordpress themes


RSS Site FeedRSS Site Feed

© 1992-2011 DC2NET™, Inc. All Rights Reserved