Have action return just {"success":true}

I have a form when I submit it, I want the action page to just return {"success":true}.

I tried this on my action page:

$result = array('success'=> true);
        echo json_encode($result);

but it returns alot of other info like forward_url,current_url,system_messages.


It their a way i can have my action page just return {"success":true}