Hello, I have an application with dynamically created textboxes. I am trying to have a checkbox that when clicked will call a javascript function that will loop through each textbox made and delete the information that is in it. I can't figure out how to get into the loop. I have for( i=0; i < document.myform.OptionValue[i];i++) but i keep getting an error saying the above line is not a created object? <script language="Javascript"> <!-- function OptionSet(clearfield) { if (clearfield.checked) { var y = 1; for(i=1; i < document.myform.OptionValue.length; i++) { document.myform.OptionValue[i].value = ""; y++; } } } //--> </script> <!--- here is the html for the form that is dynamically generated ---> <form action="edit_products_submit.cfm" method="post" enctype="multipart/form-data" name="myform"> <cfoutput query="getproductinfo"> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td> <font face="arial" size="2"> Category: </font> </td> <td> <select name="category"> <cfloop query="getcategory"> <option value="#getcategory.categoryID#" <cfif #getcategory.categoryID# is #getproductinfo.categoryid#>checked</cfif>>#getcategory.categoryName#</optio n> </cfloop> </select>* </td> </tr> <tr> <td> <font face="arial" size="2"> Product Name: </font> </td> <td> <input type="text" name="ProductName" value="#ProductName#">* </td> </tr> <tr> <td> <font face="arial" size="2"> Item Number: </font> </td> <td> <input type="text" name="ItemNumber" value="#itemNumber#">* </td> </tr> </table> </cfoutput> </form> Thank you Very much! Craig Craig A. Zingerline Advanced Media Productions Web Application Developer [EMAIL PROTECTED] ~~~~~~~~~~~~~ Paid Sponsorship ~~~~~~~~~~~~~ Get Your Own Dedicated Win2K Server! Instant Activation for $99/month w/Free Setup from SoloServer PIII600 / 128 MB RAM / 20 GB HD / 24/7/365 Tech Support Visit SoloServer, https://secure.irides.com/clientsetup.cfm. Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists