You need to sign in to do that
Don't have an account?

Remoting method not getting called.
I am using remote action method to call the method from script.But its not working.
Here is my code:
VF page:
<apex:page controller="remotingController" sidebar="false" showHeader="false" standardStylesheets="false">
<apex:includescript value="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"/>
<script>
function Save(){
var textvalue = $('.texts').text();
remotingController.renameAlert(textvalue);
return false;
}
</script>
<apex:form >
<div class = "position">
<apex:outputLabel value="TextInput"></apex:outputLabel>
<apex:inputText styleclass = "texts" style="margin-left:30px;" />
<button onclick="Save();">Save </button>
</div>
</apex:form>
</apex:page>
Class:
global without sharing class remotingController {
public remotingController(){
}
@RemoteAction
global static void renameAlert(string text){
system.debug(':::::::text:::::::::::');
}
}
Problem with ur code is that 1 ) u havent specified the callback function 2) the text() doesnt seem to work. I changes ur code and this works :
All Answers
Hi,
you have to update your VF page.. there is wrong way to call RemoteAction.
see below updated VF page.
Visualforce Page:
Important :
Hit Kudos if this provides you with useful information and if this is what you where looking for then please mark it as a solution for other benefits.
Thank You,
Hitesh Patel
SFDC Certified Developer & Administrator
Did you try in Global Remote Method?
see below link to refer.
http://www.salesforce.com/us/developer/docs/pages/Content/pages_js_remoting.htm
Yes, it's working fine..
Problem with ur code is that 1 ) u havent specified the callback function 2) the text() doesnt seem to work. I changes ur code and this works :
But In that scenario, I am passing more than 10 variables to controller.That's y I am passing values to controller with help of Remoting method.