I couldn't access your script, but generally, after defining your UI you would include code like this to call a function when the button is clicked:
Code:
pal.grp.mid.left.preset.deleteButton.onClick = onDeletePresetButton;
Don't put () after the function name or it'll get called when initially defined. Or if you want to create a new specific function for it you could use code like:
Code:
pal.grp.top.progBarBut.buttons.about.onClick = function() {
if (helpWindow instanceof Window) helpWindow.show();
else helpWindow();
}
Check out the "Control event-handling callbacks" section of the Javascript Tools Guide pdf.