I want to call phtml file and on button click that function call from knockout js file.

buttons.phtml : (File call in ajax response)

<div class="actions">
    <button type="button" title="Select" class="action primary" id="select-btn" data-bind="click:addCustom()">
    <button type="button" title="Cancel" class="action" id="cancel-btn" data-bind="click:addCustom()">

This below file content display in popup properly. But, on button click addCustom() function is not call.

How to call it?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.