i am creating a page that creates 10-45 text input areas dynamically in a
for loop. all the fields will be identical except for content, and i need a
button to clear each corresponding field individually(also dynamically
created). i have tried to do it various ways, but i cant get the proper
object declared, i always get object does not exist or object undefined
errors. I dont even know what this is called so that i can look it up. im
kind of lost as how to solve it.
below is my code
<script language="JavaScript">
<!--
// num is the number corresponding to the appropiate textarea
// function makeblank(num)
{
titlenum='txt' + num.toString();
var txt = document.form1.txtnum;
txt.value="";
}
//-->
</script>
<html>
<form name="form1" action="/admin/feedback.php" method="post">
<textarea name="txt1" style="width: 600px; height: 200px"></textarea>
<textarea name="txt2" style="width: 600px; height: 200px"></textarea>
<textarea name="txt3" style="width: 600px; height: 200px"></textarea>
</form>
</html>