:: Forum >>
How to access HTML button once created?
Hello,
I know how to add a button at the top of the grid with following code (found in the documentation):
var button = new Active.HTML.BUTTON;
button.setContent("html", "Delete");
button.setEvent("onclick", DeleteRow);
button.setClass("grid","buttonDelete");
document.write(button);
But I don't know how to modify this button when an action is fired on the grid. For example, I would like to modify the button's style when the user clicks a cell.
Thanks for your help !
Allan
Thursday, March 25, 2004
Set your button as a global variable, you can then call it from anywhere in your program.
Thursday, March 25, 2004
Alex (ActiveWidgets)
Thursday, March 25, 2004
One little thing about reserved words...
Althought Javascript and HTML are very flexible, there are some words you cannot use. You should be able to reference your button by the instance created, and the methods of the original button. But, using the word "button" to name it, is not very bright of yours. Also, do not use tab or any w3c DOM word... I had problems with that :-/ Very sad...
Pablo
Thursday, March 25, 2004
This topic is archived.
Back to support forum
Forum search