Created
August 7, 2012 22:42
-
-
Save mailtoharshit/3290136 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apex:page controller="RemotingObjectsController"> | |
<script> | |
/* Declare Javascript Function | |
function Account(){ | |
this.Id = null; | |
this.Name = null; | |
} | |
var acc1 = new Account(); | |
acc1.Name = 'Texas'; | |
var acc2 = new Account(); | |
acc2.Name = 'Austin'; | |
var accounts = new Array(acc1, acc2); | |
Visualforce.remoting.Manager.invokeAction( | |
'{!$RemoteAction.RemotingObjectsController.addAccounts}', | |
accounts | |
function(result, event) { | |
console.log(result); | |
}); | |
</script> | |
</apex:page> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment