i'm using this piece of code to test with - sorry, it aint' pretty:
what I'm trying to do is identify each of the pieces of information.
There could be many select objects with only 4 or 5 options, so how can i identify the object and its information.
thanks in advance.
Code:<html><head><title>Title</title></head> <body> <script language="Javascript"> function doProductPick(i) { var si; var pvalue; var desc; var j; var k; for (k=0;k<document.mock.mockup.length-1;k++) { for (j=0;j<document.mock.mockup[i].options.length-1;j++) { si = document.mock.mockup[k].options[j].selectedIndex; pvalue = document.mock.mockup[k].options[j].value; desc = document.mock.mockup[k].options[j].text; alert("selectedIndex: " + si + " - value: " + pvalue + " - desc: " + desc); } } //si = document.mock.mockup[i].options[i].selectedindex; //pvalue = document.mock.mockup[i].value; //desc = document.mock.mockup[i].text; //alert("selectedIndex: " + si + " - value: " + pvalue + " - desc: " + desc); //alert(i); } </script> <form name="mock" method="post"> <% dim boolContinue dim counter counter = 0 boolContinue = true %> <table border="1"> <% while boolContinue %> <tr> <td> <select name="mockup" onchange="doProductPick(<% =counter %>)"> <option></option> <option value="pink">Pink <option value="red">Red <option value="white">Blue <option value="green">Green </select> </td> </tr> <% counter = counter + 1 if counter = 20 then boolContinue = false %> <% wend %> </table> <input type="submit" value="go"> </form> </body> </html>




Reply With Quote