Zend certified PHP/Magento developer

“undefined” Appended to URL Causing 404 Page Not Found Error

I need a help regarding http request or ajax call,

I am trying to open forgot password page in popup,I have loaded widget model popup and it is working as expected.

Now I am trying to reset password, when I try to reset password then it’s redirected to my custom controller and not returning to page, in URL appended “Undefined”.

I thought it’s issue of “customer/section/load/” so I’ve added custom controller in the section.xml file and it is reloaded

<action name="accountmtr/customer_ajax/forgot">
        <section name="checkout-data"/>
        <section name="cart"/>
        <section name="customer"/>
    </action>

but this solution is not working,url is look like “https://example.com/undefined”

I have check the logs but no any exception found in the logs

could you please help me on this?