+ Start a Discussion
Sumeet_ForceSumeet_Force 

JS Remoting not working :Visualforce not getting identified

Below code results in an error in the console [Uncaught ReferenceError: Visualforce is not defined]:
<apex:page >
<script type="text/javascript">
    Visualforce.remoting.timeout = 120000; // Set timeout at page level
</script>
</apex:page>

Please help. I have tried this in namespace or namespace free org both. But error prevails.
 
Best Answer chosen by Sumeet_Force
James LoghryJames Loghry
This class / variable is dependent on a controller or extension having a RemoteAction method defined.  Upon creating the RemoteAction method (either in a custom controller or extension), you'll notice this error disappears.