Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Clear texbox inside a panel

Status
Not open for further replies.

thefox149

Technical User
Nov 22, 2004
158
AU
Hi guys I am new to javascript and I need a little help with clearing just textbox's inside a particular panel my .aspx page has about 3 panels inside

I would prefer to use a loop rather than type out individual code for each box

Thanks in advance

My cat's name is sprinkles
-Ralph Wigam
 
there is no such thing as a "panel" in HTML. please provide your HTML so we can help you more. the general concept would be something like this:

Code:
var myPanel = document.getElementById("myPanelID");
var myInputs = myPanel.getElementsByTagName("input");

for ( var i = 0; i < myInputs.length; i++ ) {
    myInputs[i].value = "";
}



*cLFlaVA
----------------------------
[tt]"quote goes here"[/tt]
[URL unfurl="true"]http://www.coryarthus.com/[/url]
 
I am using asp.net and would like to clear the textbox items on the client rather than a postback I can as stated in my fist post I can declare each textbox and clear each but that adds alot of code I would prefer to just clear these items...is there a way to just identify these textboxes (each are nameded de_(then some name) can you do a like "*de_*" clear type of a command if panel annot be used as a container?

My cat's name is sprinkles
-Ralph Wigam
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top