Call JS action with Button onClick

Hi all,

Does anyone know how to be able to call an URL or a javascript function from a button onClick event ?

My goal is to be able to download the content of a MetaFile (not the DMS) using a button. I succeed to make it with a controller and a response.setView(…) but when I click on the button the file is downloaded and a new tab is displayed as well.

Thanks in advance for your help

Regards

If you are able to download with controller and only issue is opening new tab, add .param(“download”, “true”) on ActionView (that you set on response.setView). It will suppress opening new tab.

Hi,

Thank you very much…it’s magic now :slight_smile:

Best regards

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.