You need to sign in to do that
Don't have an account?
Suman 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:
I know its simple but im not able to get debug message.
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.