newb: recurse over elements children and disable all form elements

Giganews Newsgroups
Subject: newb: recurse over elements children and disable all form elements
Posted by:  SteveKle‚Ķ@gmail.com (SteveKle…@gmail.com)
Date: 18 Sep 2006

I have a subset of form items that I need to perform different
operations on (enable/disable, clear values, change style, etc)

rather than hard code the IDs or names I would like to recursively
search a parent element(in my case a <table>) and search for elements
of a certain type (<input>, <textarea>, etc) and perform operations on
them.

I've done some initial googling and found PLENTY of samples of
disabling all form items, but I need to work on a subset.

I'm also very new to the DOM and am not sure how to do type checking (
  IE: if(item is type(input))  )

Any suggestions or tips welcome.

Thanks,
Steve

Replies