ids is an array of all elements with the class name of 'linkIndexNumber' which is only the hidden fields.
i figured that getElementsByClassName would return them in the order they appear on the page, so i am using that to base which number they are in the list. then i am setting each of them to the value. ids[i] would be the item inside the id array. maybe there is a better wat to do this that i am not thinking of. > Assuming that $(ids[i]) is the hidden input field, wouldn't the > following line need to reference it as a form element? >> $(ids[i]).innerHTML = i; > > > I would assume it should be (the "'' + " makes it a string, not sure if > you can set a form element value to an int, maybe you can): > $(ids[i]).value = '' + i; > > Or maybe I'm not understanding the code. > > Greg > _______________________________________________ > Rails-spinoffs mailing list > [email protected] > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > _______________________________________________ Rails-spinoffs mailing list [email protected] http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
