Redirect when clicking Add(+)

I need to redirect when clicking ‘+’ button.
i am done…
What my issue is,
When clicking + button it creates NewTask from ClientSide without doing anything.

phaseGantt.attachEvent(“onBeforeTaskAdd”, function (id, item) {
return false;

    phaseGantt.attachEvent("onBeforeLightbox", function (id) {

        var projName = document.getElementById('lblProjectName');

        var projID ="?")[1].split("=")[1];

        window.location.href = _spPageContextInfo.webAbsoluteUrl +
            '/Pages/AddPhases.aspx?parentTask=' + phaseGantt.getTask(id).parent +
            '&&projID=' + projID +
            '&&projName=' + projName.textContent;;
        return false;

I need to avoid creating NewTask by + button automatically…When I refresh it,that created NewTask has been deleted automatically … In which event I need to return false…

You can fully remove plus button if necessary, just define the grid’s configuration without the “add” column. … lumns.html

You can redefine inner handler if necessary, by using

gantt._click.gantt_add = function(e, id){ //some custom code };

No i need that ‘+’ button. On clicking the button , i ought to redirect to new page without creating NewTask automatically in cache.

In Previous version , onBeforeTaskAdd i returned false , so it worked perfectly.
Now i bought v2.1[Pro] , so i am facing this issue.

Kindly help me to get over the issue.

As far as I can see - this behavior still presents in Gantt 2.1
Returning false from onBeforeTaskAdd event handler will block creation of new event.

if you have multiple gantt’s per page, be sure that event handler attached to the necessary instance of gantt.