In my previous post about the Line-Duplicater I had to find specific tags within a DOM element. As I found nothing in the Utility Methods I had to use the getElementsByTagName() function. But only with this function I couldn’t solve the problem. I also had to use the $A() function to get an array of the elements. The result for all there form input types looked like that:
$A(newRow.getElementsByTagName('select')).invoke('clear'); $A(newRow.getElementsByTagName('textarea')).invoke('clear'); $A(newRow.getElementsByTagName('input')).each(function(elm){ elm.clear().checked = ''; });