Button text/style change
Button text/style change
aaronw
Posts: 89Questions: 3Answers: 4
Is it possible to have the button text or style change for a text button after it is pressed? I looked in the dom and there is an ID assigned by the plug-in to the button, so I suppose I can grab that and rewrite it in the fnClick function, but that seems somewhat dodgy to me. I'd prefer to use a 'more official' method. The problem I'm trying to solve is that I have a list of trouble tickets and I want to be able to hide all the closed tickets with just one click, so I'm using oTable.fnFilter ("Open",0); to do that (in the fnClick)
This discussion has been closed.
Replies
[code]
{ "sExtends": "text","sButtonText":"Toggle Closed","fnClick":function (nButton,oConfig,oFlash){
if (showclosed)
{
$("#closed").text("Showing open cases");
oTable.fnFilter ("Open",0);
showclosed = false;
}
else
{
$("#closed").text("Showing all cases");
oTable.fnFilter("",0);
showclosed=true;
[/code]