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

JQuery Communication for Salesforce
Hi All,
I embeded a jquery codes in my custom vf page. What I would like to do is to use the jquery elements (ie, textbox,radio button, links, etc.) to communicate with Salesforce objects that is when a user clicks the save button, records will be created using the data that was filled in from the jquery elements. Please advise on what is the best way to do this kind of scenario.
Thanks in Advance
The save button might be able to run javascript that copies the data from the jscript components to salesforce hidden components that are inside a salesforce form and would submit the form.
Something like
<submit name="Save" onclick="saveToSF();">
<script>
saveToSF = function() {
document.getElementById("{!$Component.SFDCForm1.field1}").value = document.getElementById("Your form fieldid").value;
...
document.getElementById({!$Component.form1.submit1}").click;
};
</script>
<apex:form id="form1">
<apex:inputHidden value="{!name}" id="field1" />
<apex:commandButton action="{!yourControllerMethod}" id="submit1" />
</apex:form>