Posts: 1,832
Location: Somewhere else entirely
|
What you are doing is writing a javascript function that can handle an alteration in any of your text boxes. It tells which one is being changed by the number you pass in.
You then use php to identify each of the textboxes, by telling the first one to call heightauto(1) and the next to call heightauto(2) etc. When you alter the 2nd one say, for the second time, heightauto(2) gets called again and the update is made.
You have a php loop that runs once when the page is generated, and one javascript function that is called on a textbox change. The php loop effectively numbered the textboxes by filling in their argument so the javascript function knows what to do in each case. You don't actually have any js loops at all.
__________________
UPDATE 0beron SET talkupation = talkupation + lots WHERE post = 'helpful';
Please login or register to view this content. Registration is FREE (aka MSN handwriting for forums)
|