Hello, I have some javascript code and a button which already has an event/action assigned to it, and I want to add a second event to the button. Currently the relevant bit of code looks like this:
events: {onclick: "showTab('"+n+"')"},
how do I amend this code so that it also increases the 'wdith' property of a div with class='panel', by a fixed amount e.g. 50px?
Thanks
EDIT:
I understand. Problem is I don't know how to change id, only classname. The div is constructed in javascript using buildDomModel as follws:
this.buildDomModel(this.elements["page_panels"],
{ tag: "div", className: "tab_panel",
id: "tab_panel",
childs: [...]}
)
But the id doesn't get changed to 'tab_panel'. HOWEVER, classname does get changed to 'tab_panel' which is why i tried to use getelementbyclass. So the div has no id and I don't know how to create one using the buildDomModel but I can give unique class. I have put the code in original post too.