Hi,
I am a little new to all this and am currently tearing my hair out.
I have a function that needs to be called multiple times and looks like....
function LoadInc(theField)
{
inctxt = new Array();
inctxt[0] = new Array; inctxt[0][0] = ''
inctxt[0][1] = '10'
inctxt[0][2] = '11'
inctxt[0][3] = '12'
inctxt[0][4] = '13'
inctxt[0][5] = '14'
for (i=0; i<inctxt.length; i++) {
alert("test")
document.IATeleform.theField.options.length = inctxt[0].length;
total = inctxt[0].length;
alert("Total = " + total)
}
for (n=0; n<total; n++) {
document.IATeleform.theField.options[n].text = inctxt[0][n];
}
}
This doesn't work! But when I actually use the proper fields name instead of "theField" it works fine. Any ideas how to resolve this or am I missing something.
Thanks
Jamie
I am a little new to all this and am currently tearing my hair out.
I have a function that needs to be called multiple times and looks like....
function LoadInc(theField)
{
inctxt = new Array();
inctxt[0] = new Array; inctxt[0][0] = ''
inctxt[0][1] = '10'
inctxt[0][2] = '11'
inctxt[0][3] = '12'
inctxt[0][4] = '13'
inctxt[0][5] = '14'
for (i=0; i<inctxt.length; i++) {
alert("test")
document.IATeleform.theField.options.length = inctxt[0].length;
total = inctxt[0].length;
alert("Total = " + total)
}
for (n=0; n<total; n++) {
document.IATeleform.theField.options[n].text = inctxt[0][n];
}
}
This doesn't work! But when I actually use the proper fields name instead of "theField" it works fine. Any ideas how to resolve this or am I missing something.
Thanks
Jamie