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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding attribute to panel

Status
Not open for further replies.

TheVampire

Programmer
May 1, 2002
828
US
I'm trying to find out if there is an attribute that I can add to a panel control so that I can run a javascript function when the panel is enabled.

What I have are several text boxes and some buttons inside a panel. I've added attributes to two text boxes so that they have to have text in them before a button is enabled, and wrote a script to do this and that works fine. The problem is that I make the panel disabled while some other information is being entered eslewhere on the page, and when I make the panel enabled again, the button inside that was previously enabled by my script is now disabled. I need to run the script to check the textboxes again so that the button will be enabled, but I can't figure out which attribute I would need to add to the panel do this.
 
I'm not sure whether you are enabling/disabling the div elements server side or client side, but I'd recommend just having a client-side javascript function that does all of the enabling and disabling as appropriate. Also, if you aren't already, have a look into using JQuery as this will simplify the process.

Mark,

Darlington Web Design[tab]|[tab]Experts, Information, Ideas & Knowledge[tab]|[tab]ASP.NET Tips & Tricks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top