SimpleButton - How to use it?


Hi there,

according to Bonita 5.X documentation:

Use the simple button on a form to call a Java script.

By doing this...

Click on the Details panel > General tab > Options pane and enter the Java script in the HTML attributes field.

Unfortunately Bonita 6.X documentation doesn't make any reference to this I use 5.X

First question...

is "Java Script" (as written) Java code or JavaScript (one word), I'm assuming the latter as I believe you can also use jQuery on the button...

Anyway...How to use it?

I have added the following code to my SimpleButton

<script type="text/javascript">
        alert("I am an alert box!");

And it doesn't work...there are no errors, in fact nothing happens...

I've tried it as follows:

        alert("I am an alert box!");

with the same results...nothing happens and there are no errors...

How do we use Javascript on the SimpleButton? Anyone got a simple example?

Thanks and regards Seán

1 answer

This one is the BEST answer!

You can put this code in the HTML attributes field on the Options tab:

onclick="alert('I am an alert box!')"