ramnewbietoaccess
Programmer
I'm sorry I dont know how to better describe the question in HTML so I used excel terminology lol....
I have 100 text boxes in rows for a user to possibly fill from two different dynamic list boxes to autopopulate the item and the cost.....I am wondering how to make the list box find the first empty row and autopopulate the text box by their selection as you can do in excel. The code I presently am using is this but I would need a list box for every line....Is there a way to have it find the first empty text box in the rows?
<script language="javascript"><!--
function giveToText(str) {
var f = document.forms['f'];
var s + str.split(" - ");
f.elements['the_price'].value = s[0];
f.elements['the_item'].value = s[1];
}
--></script>
</head>
<body>
<form name="f">
<select name="s" onchange"giveToText(this.options[this.selectedIndex].value;">
<option value=$12.00 - Hotdogs">$12.00 - Hotdogs</options>
</select>
<br />
<input type"text" name="the_price" />
<input type"text" name="the_item" />
</form>
</body>
thank you in advance for any suggestions or advice
I have 100 text boxes in rows for a user to possibly fill from two different dynamic list boxes to autopopulate the item and the cost.....I am wondering how to make the list box find the first empty row and autopopulate the text box by their selection as you can do in excel. The code I presently am using is this but I would need a list box for every line....Is there a way to have it find the first empty text box in the rows?
<script language="javascript"><!--
function giveToText(str) {
var f = document.forms['f'];
var s + str.split(" - ");
f.elements['the_price'].value = s[0];
f.elements['the_item'].value = s[1];
}
--></script>
</head>
<body>
<form name="f">
<select name="s" onchange"giveToText(this.options[this.selectedIndex].value;">
<option value=$12.00 - Hotdogs">$12.00 - Hotdogs</options>
</select>
<br />
<input type"text" name="the_price" />
<input type"text" name="the_item" />
</form>
</body>
thank you in advance for any suggestions or advice