I am using liferay 6.2. I have an add button beside a select box. Upon selecting an element from the box and clickin on add should add the respective element. It was working well on liferay 6.1 but now the click event does not do anything instead jumps to a new window. My code is here:
AUI.use(
'aui-button',
function(A) {
new A.Button(
{
handler : function() {
// do some processing
},
icon : 'plus',
label:'Add',
render : '#newcategorybutton'
});
});
I also tried to use:
YUI().use(
'aui-button',
function(Y) {
var addButton= new Y.Button(
{
label: 'Add',
srcNode: '#newcategorybutton'
}
).render();
addButton.addListener("click",handleClick);
function handleClick()
{
alert("clicked");
}
}
);
BUt it did not work. Does anybody have some idea regarding this?