kev510
Programmer
- Jul 12, 2006
- 61
Hello everyone,
I am trying to create a javascript function to show values of select boxes (drop down menu) that are dynamically created with the LOOP function using vbScript. It creates a select box for each of the lines of the table I have on my webpage. So if there ends up being 10 rows in the table, vbScript will create 10 select boxes.
The ID of these select boxes are also dynamically named, such as SelectBox1, SelectBox2, SelectBox3, etc...
The javascript function should loop through to obtain the value of those select boxes and display them using alert() function. So far, here's what I've come up with -
//vCount is the number of select boxes I have in the webpage
var vCount = document.saveform.vCount.value
var i=0
for (i=0; i<=vCount; i++)
{
alert(document.saveform.SortOrder+i.value)
}
Thank you for any help that you can provide!
Kevin
I am trying to create a javascript function to show values of select boxes (drop down menu) that are dynamically created with the LOOP function using vbScript. It creates a select box for each of the lines of the table I have on my webpage. So if there ends up being 10 rows in the table, vbScript will create 10 select boxes.
The ID of these select boxes are also dynamically named, such as SelectBox1, SelectBox2, SelectBox3, etc...
The javascript function should loop through to obtain the value of those select boxes and display them using alert() function. So far, here's what I've come up with -
//vCount is the number of select boxes I have in the webpage
var vCount = document.saveform.vCount.value
var i=0
for (i=0; i<=vCount; i++)
{
alert(document.saveform.SortOrder+i.value)
}
Thank you for any help that you can provide!
Kevin