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
stephenystepheny 

Is it possible to enable ajax call to our server by httpXmlRequest on VF or Scontrol?

Hi Expert,
 
I use dojo and prototype to create a httpXmlRequest to visit my own server. No exception throws but no result return.
I have tried the same code on my local env and it worked but it didn't work on VF and Scontrol.
Is there any limitation about httpXmlRequest on VF or Scontrol?
 
 
Thanks,
Stephen
ArtabusArtabus

That is a browser limitation for security reasons.

That is why the sforce.connection.remoteFunction() method has been developed in the Ajax Toolkit, to allow webservice calls to other domains.

mtbclimbermtbclimber
Depending on what you want to do you can also make a callout from an Apex controller or extension behind a Visualforce page.  The same whitelist requirement applies to both the remotefunction call as well as the webservice callout. If your webservice is SOAP then you could also generate Apex stub classes from your WSDL.  Check out the Apex language reference for more details.


Message Edited by mtbclimber on 08-24-2008 08:47 AM