Creating a custom button and binding events

Posted by ithrees.ai on 28-Apr-2014 05:58

Hi Dears,

While I am just exploring the rollbase features I just wanted to have a custom button in a tab(without object) where I can bind click event with custom functions. When I tried to create the button with the html editor it is not allowing me to bind the 'onclick' event within html section. 

I hope there should be a way to create custom buttons and functions in rollbase and help me to find it.

Thanks in advance,

Ithrees

All Replies

Posted by sedwin on 28-Apr-2014 06:46

Hello,

You can use the 'Script Component' available in Editor page and create custom buttons in a Tab.

Example:

<button onclick="myFunction()">Click me</button>
<script>
function myFunction(){
alert("Welcome");
}
</script>

Hope this helps

Thanks,

Sopna.

Posted by ithrees.ai on 28-Apr-2014 07:29

Hi Sopna,

Thank you for your replay, and Yes It is working when I put it inside the script sections. I thought the button definition would come inside html section and script component for only javascript code.

So you are telling that we can go with the script component for the customization, inside we can put all the html elements..

Thank you again for your answer..

Ithrees.

This thread is closed