Call Javascript function on custom button click

Call Javascript function on custom button click

vaibhavivaibhavi Posts: 3Questions: 3Answers: 0

I have added a custom button called "Add new record"
I want to open a new page as modal pop on button click.

$('#example').dataTable(

    {


        buttons: [

            {
                text: 'Add New Record',
                sClass: "dt-button buttons-excel buttons-html5",
                action: function (e, dt, node, config) {
                    alert(hello);
                }

            },

        ],

How can i achieve this .
Please provide help.

Answers

  • allanallan Posts: 63,761Questions: 1Answers: 10,510 Site admin

    Looks like you already have done what I would suggest. Does the alert() not show up for you? If not, can you link to a page showing the issue.

    If you don't know how to open a new page in Javascript I would suggest asking on StackOverflow or similar for general Javascript questions.

    Allan

This discussion has been closed.