You need to sign in to do that
Don't have an account?
Force.com
Javascript remoting syntax error
Hi All,
I have written a very basic remote method for js remoting.
global class remotingDemo{ @RemoteAction global static string getSession(){ string para = 'woww...'; return para; } }
Calling above method from visualforce
<script> function getValues(){ remotingdemo.getSession(function(result,event){ document.getElementById('r').value = result; },{escape:true}); } </script> <input type="button" value="Contract Aproval" onclick="getValues()"/> <INPUT NAME="requestId" TYPE="text" id='r'></INPUT>
But getsession() of global class is not getting called when i clicked on html button. I am kind of stucked in this basic calling structure. Any help will be highly appreciated.
Thanks,
Pragati
Hi,
Go through the below post it will help you. Let me know if you are not getting.
http://boards.developerforce.com/t5/Apex-Code-Development/Javascript-Remote-Action/m-p/557397#M101844