By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,480 Members | 1,766 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,480 IT Pros & Developers. It's quick & easy.

control type?

P: n/a
CK
Is there anyway to loop through and check the type of control. I am only
trying to retreive <input type='text' /controls.

<script type="text/javascript">

function sweet(ctrl){

var row = ctrl.parentNode.parentNode;

var boxes = row.getElementsByTagName('input');

for(var x in boxes)

alert(x.id);

}

</script>

Thanks,

~CK
Sep 21 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
var boxes = row.getElementsByTagName('input');
for(var x in boxes)
if (x.type=='text'){
//DO IT HERE
}

}
CK wrote:
Is there anyway to loop through and check the type of control. I am only
trying to retreive <input type='text' /controls.

<script type="text/javascript">

function sweet(ctrl){

var row = ctrl.parentNode.parentNode;

var boxes = row.getElementsByTagName('input');

for(var x in boxes)

alert(x.id);

}

</script>

Thanks,

~CK
Sep 21 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.