You need to sign in to do that
Don't have an account?
soa
Code for S-control:
Where in Force.com have they included Functions.js?
How I include multiple js Files?
Hi,
If I have multiple js Files , How should I include them ?
In refrence to Salesforce-Apex-Language-Refrence , page no -21, they have written a S-control for the Apex Code:
Apex Code:
Code:
global class HelloWorld2 { // The WebService keyword makes this a public WebService method WebService static String sayHelloWorld(String arg) { // This method returns a simple message return 'Hello '+arg; } }
Code for S-control:
Code:
<html> <head> <script type="text/javascript" src="/js/functions.js"></script> <script src="/soap/ajax/11.0/connection.js"></script> <script src="/soap/ajax/11.0/apex.js"></script> <script> function demo() { var result = sforce.apex.execute('HelloWorld2' , 'sayHelloWorld', {arg:"new Apex user!"}); document.getElementById('userNameArea').innerHTML = 'Congratulations!' + ' ' + result; } </script> </head> <body onload=demo()> <div id=userNameArea> </div> </body> </html>
Where in Force.com have they included Functions.js?
How should I include multiple js Files?
Please help.
Regards
Diti