function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Suman KuchSuman Kuch 

javascript Remote not calling controller

Hi, 
I'm writing a test for invoking Controller functions from Javascript, I don't see any failures in code but function is not invoking.
Please advice.

VisualForce:
<apex:page controller="UploadController" id="page">
<script type="text/javascript">
    
    function uploadFile(accountName){
            Visualforce.remoting.Manager.invokeAction(
            '{!$RemoteAction.UploadController.testRemoteCall}',
            function(result, event){
            
             },{ escape: true}
        );
    }
    
    </script>
    <apex:form id="form_Upload">
        <apex:pageBlock >
            <button onclick="uploadFile('{!$CurrentPage.parameters.recID}')">Upload File</button>
        </apex:pageBlock>
    </apex:form>
</apex:page>

Apex:
global with sharing class UploadController {
    
    
    public UploadController() { } 
    
    @RemoteAction
    global static void testRemoteCall() {
        system.debug(' Sample Remote call ');
    }
}

I know its simple but im not able to get debug message.