Hi,
You might find the following helpful:
Code:
for (i = 0; i < 3; i++){
x = ('var myVar' + i + ' = ' + i)
eval(x)
alert("test1: x is a " + typeof x + "\n x = '" + x + "'")
}
for (i = 0; i < 3; i++)
alert('myVar' + i + ' = ' + eval('myVar'+i))
for (i = 0; i < 3; i++)
alert(eval('var myVar' + i + ' = ' + i))
for (i = 0; i < 3; i++)
alert('test2: myVar' + i + ' = ' + eval('myVar'+i))
However, 'dynamic' does not always mean 'unknown', so what is you are doing exactly? For example: Why can't you grab the recordset length and use that to determine how many vars you need?
Vinny
Bookmarks