Button onclick javascript

Hi,

Im trying to add some fairly simple javascript to a button onclick in Cornerstone but cant see how to do this. There are no instructions in the button help fields that I can see. There are only id and css fields that can be added for customisation.

Are there any help files on how to do this or can you advise me on code to add please?

Thanks,
W

Hi Will,

Thank you for writing in, you can use the Custom Attribute field of the element.



You can read more about custom attribute here (scroll pass the grid explanation)

Hope it helps,
Cheers!

Im sorry, I have no idea how to use this from the very scant help file. Can you be more descriptive please.

Hi Will,

Sorry about that, ok here it is, please inspect your button element and see the customize tab

There you’ll see the Custom Attributes option, click that small +, to add your own custom Attributes

Add the event onclick on the name field, and your script/function on the value field.

If you do not see this Custom Attributes option on your end, please enable Advance Mode

Hope this helps,
Cheers!

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