ok
I found a 'solution' to the problem, my table was held within a form, but as the form had nothing which required to be submitted, (the buttons were either links or called some js), I removed the form tags around the table and hey, it works.
So it seems my image button to call the js function performs ok unless it is held within a form.
Not sure why at this point, maybe the image button acts like a submit when in a form ?
However, the real answer is staring me in the face.
Don't change the button type at all, leave everything as created by databridge dataasist wizard, and simply change the button's appearance usingcss