Finding out Controls of the Page in Client Side

Posted by Somasundaram under JavaScript on 5/10/2012 | Points: 10 | Views : 847 | Status : [Member] | Replies : 1
Hi.,

I need to find out ID of all the textbox in webPage.
I need the Code in client Side(javascipt).

If any know pls help me..

Thanks in Advance..

Regards,
Somasundaram




Responses

Posted by: Ajay.Kalol on: 6/4/2012 [Member] Starter | Points: 25

Up
0
Down
Try Following Code:

Var ListTextBox;

ListTextBox = document.getElementsByTagName("input");
var AryList = new Array();
for(int i = 0; i < ListTextBox.Lenth; i++ )
{
if(ListTextBox(i).type == "text")
{
AryList(i) = ListTextBox(i).id
}
}

Remove (i) with square bracket
if Found Your Solution Mark it as Answer.

Ajay
ajaypatelfromsanthal.blogspot.in

Somasundaram, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response