BananaQuaalude
08-09-2003, 12:05 PM
Hello,
I'm wondering if this is even possible- can you refer to a dynamically named form element (a text box) and assign a value to it?
Here's the element:
<input type="text" name="txt<%=RowData%>" value="">
RowData is going to equal 100, 101, 102, etc. - I won't know how far the list goes.
And what I need to do is refer to each one of those textboxes in a select's onChange event:
function changeIt(RowData){
document.frmData.txt[RowData].value = "[another value]"
}
I can't find a way to substitute the name of the textbox (keep getting 'object required' errors) because it doesn't recognize anything by that name.
Anyone?
I'm wondering if this is even possible- can you refer to a dynamically named form element (a text box) and assign a value to it?
Here's the element:
<input type="text" name="txt<%=RowData%>" value="">
RowData is going to equal 100, 101, 102, etc. - I won't know how far the list goes.
And what I need to do is refer to each one of those textboxes in a select's onChange event:
function changeIt(RowData){
document.frmData.txt[RowData].value = "[another value]"
}
I can't find a way to substitute the name of the textbox (keep getting 'object required' errors) because it doesn't recognize anything by that name.
Anyone?