This is a migrated thread and some comments may be shown as answers.

find all radTextBox in a panel to clear each value jquery

1 Answer 162 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
chen
Top achievements
Rank 1
chen asked on 13 Jun 2014, 12:28 PM
Hi all,

I need you guys help on jquery to get all the input Type of RadTextBox in a panel and then clear the value each. I found example of jquery here 
http://forums.asp.net/t/1968988.aspx?Clear+Textbox+in+panel+using+jQuery 

But the input[type=text] itself has clear other control as well such as RadComboxBox as it has input[type=text] in it. How to find only the RadTextBox that contain in a panel and clear the value of it?

Thanks in advance.
Regards
Pui

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 13 Jun 2014, 12:41 PM
Hi chen,

Please try the below JavaScript to achieve your scenario.

JavaScript:
function pageLoad() {
    var item = document.getElementsByTagName("input");
    for (var i = 0; i < item.length; i++) {
        if (item[i].type == "text") {
            item[i].control.clear();
        }
    }
}

Thanks,
Shinu.
Tags
General Discussions
Asked by
chen
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or