I need to loop through all textboxes on a page and gather their IDs so that I can have backward compatibility placeholder text in IE7.
Here is my code:
var boxes = document.getElementsByTagName('input');
for(i = 0; i < boxes.length; i++) {
placeHolder(boxes[i].id);
}
This works perfectly, but it also selects my submit button which I don't want.
The only thing my textboxes have in common is type="text". So is there anyway of getting just elements that are of the text type within Javascript?