function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Thai HuynhThai Huynh 

Traditional Ajax

I wanted to know if there's a traditional way of using ajax within VF. I get the ease of using VF functions but it will be a nightmare to separate out the code if you decide to move to another platform and reuse the same front end code. For instance, we have an app that temporarily use Salesforce but eventually will move to its own portal because SF cannot meet all of our needs. I want my javascript/css to be completely separated from VF so when it's time to move, it will be a simple as swapping our URL's inside the javascript files for the Ajax requests.

 

Thai

kevoharakevohara

Are you trying to make AJAX requests to the Salesforce API's?  Or are you talking to external services?

 

Can you give us a little more detail on what you are trying to do with AJAX?  You do have a lot of options for client-side code with the AJAX proxy, JS Remoting, AJAX Toolkit.

Thai HuynhThai Huynh

Actually, I found a pretty nice way of doing it. It's basically what I needed to do. I have 1 controller and all my ajax call are route to that.

 

http://www.tgerm.com/2010/02/visualforce-salesforce-jquery-ajax-how.html