Questions tagged [ajax]

With AJAX (Asynchronous JavaScript and XML), web applications can send data to, and retrieve data from, a server asynchronously.

Filter by
Sorted by
Tagged with
0
votes
1answer
484 views

inputField onchange event not rerendering outputPanel

Not getting an inputField to rerender an using onchange event. It will fire if I click out of the inputfield. Any ideas? <apex:component controller="PROD_CCRA_LOB_NonStdAutoController" > <...
0
votes
1answer
353 views

How to submit a Pardot form using AJAX?

I am confused a little bite, why pardot is not allowing such ajax requests ? aren't they more user friendly features ? I added a form handler and tried to use it of course & it works when I keep ...
0
votes
2answers
804 views

Show Loading gif after onchange() in inputField

I have a very simple VF page that calls a method in my controller to populate a selectoptions. The method in my controller calls an external API so it takes a bit of time to populate selectoptions. ...
0
votes
0answers
37 views

updating data extension from front end javascript using ajax and json code resource

I have a preference center page to update preference values using toggle button(check boxes) without a save/submit button, so each toggle button should be processed separately. I am making ajax call ...
0
votes
1answer
1k views

show updated fields without reloading Lightning page

We are creating an INVOICE through Lightning form. Once the cx filled the form and press SAVE button, we are making a REST api call to java application and getting more details like invoice number, id ...
0
votes
2answers
2k views

ActionStatus firing an event Twice on VF Page

Feel I am missing something obvious...I have a page with a button that calls a web service, then re-renders an output panel to show the results EDIT - seems to be an issue with PageBlockButtons? ...
1
vote
1answer
66 views

Populating a combobox with Salesforce data

I want to create a component with one input box with type="date" and a combobox that gets populated with options after a date is selected in the first input box component. I want this to ...
0
votes
1answer
238 views

What does same origin policy mean when trying to submit a Web to lead form via AJAX? [closed]

I am stuck working on a task, I get a same origin policy error : Access to XMLHttpRequest at 'https://webto.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8' from origin 'http://localhost' has ...
0
votes
0answers
112 views

Is there a way to submit web to lead forms?

I am trying to submit my webtolead form, somethinf that is so simple and basic jQuery, But I am getting CORS origin error : <script> // https://www.domainName.my.salesforce.com/servlet/...
5
votes
3answers
2k views

visualforce page ActionFunction reRender not Working

reRender on actionFunction is not working. I've also tried placing the actionFunction on top. What's wrong with my code? function doSearch() { searchServer(document.getElementById("accName")....
1
vote
1answer
47 views

Send progress of CloudPage back to browser during AJAX request

I'm processing CSV files with a CloudPage. I upload the CSV file, then stringify the array, and send it via AJAX to another page. Previously, I had been doing this row by row so that I could show a ...
1
vote
0answers
113 views

Whitelisted domain in Salesforce but getting No 'Access-Control-Allow-Origin' header is present error

I'm trying to submit a form on my website (xyz.com) to Salesforce. When I click submit, I get this error Access to XMLHttpRequest at 'https://webto.salesforce.com' from origin 'https://www.xyz.com' ...
1
vote
0answers
168 views

AJAX request to Cloud Pages from 3rd page origin

I'm trying to use JS in my origin website to make an AJAX POST to a Cloud Page, that should then write the post data to a Data Extension. The process works well on Postman. The goal is to retrieve ...
0
votes
1answer
125 views

How Can I Integrate the Flickr API with a Lightning App?

I'm presently working my way through Learning JavaScript Design Patterns by Addy Osmani, and trying to figure out how I can make these patterns functional and/or useful in the Salesforce Aura/...
5
votes
1answer
6k views

CORS whitelisting not working as expected

I'm having an issue with CORS where I'm unable to make a POST request to a Salesforce site from another site, but one I have listed in my CORS whitelist. Not sure if I have something set up wrong, or ...
0
votes
0answers
314 views

salesforce get token using jQuery ajax method

I have just intigrated the salseforce api using curl in php and its working fine but now i have to using the same thing with ajax so no curl is used here below is my code var param = { grant_type: "...
3
votes
2answers
449 views

Manually Enforce CRUD and FLS in trigger handler and Ajax to pass salesforce security review

I want to pass salesforce security review in my app. I want to make sure that all the known issues fixed before submission. I have Enforced CRUD and FLS in to all the apex classes. But i am not sure ...
9
votes
2answers
11k views

How do I use Javascript or jQuery externally to send data to Salesforce Leads?

I have a website form using HTML and jQuery/Javascript on my own domain that I want to post to Salesforce (web2lead or not, as long as it gets there) using an ajax call. I keep getting the Access-...
1
vote
1answer
479 views

How can i use Marketing cloud Rest API in client side?

Im trying call one endpoint from marketing cloud rest api with AJAX, but im having problems with CORS. This is the error: No 'Access-Control-Allow-Origin' header is present on the requested resource. ...
1
vote
1answer
125 views

Getting JSON_Parser_error when using Sfdc.canvas.client.ajax to Create multiple records using REST API

I am trying to insert 2 records at a time using canvas client in a connected app, using REST API, code and response below: Sfdc.canvas.client.ajax('/services/data/v47.0/composite/sobjects',{ "...
1
vote
0answers
194 views

Ajax call to data extension

Client wants to direct people to a landing page. Within the landing page, there is a registration page that takes some information from the user. One of the questions is for the user to select from a ...
6
votes
1answer
3k views

Visualforce: Major grief with IE9 AJAX refresh/rerender issues

Friends, I have a VF page which is part of a customer portal. This page displays records from custom object in a Apex:DataTable. I have added pagination with Prev,Next,First,Last links to enable ...
0
votes
1answer
220 views

when i click on text its checkbox automatically checkbox must checked in visualforce Page

<apex:page controller="Apexclassforaccandcheck"> <apex:form> <apex:pageBlock> <apex:dataTable value="{!acw}" var="aa"> <...
0
votes
1answer
263 views

Pageblocktable is not rendering

I'm not able to render the pageblocktable i have set flag in controller and used that flag in vfpage rendered attribute but its not working Controller public class wrapperclass { public List&...
1
vote
0answers
247 views

Showing progress bar through ajax request in visualforce page

I have created a vf page to upload MultipleFiles at a time. Now using AJAX request i am passing the file to Salesforce server and using addEventListener to show the progress bar, The issue here is the ...
2
votes
3answers
860 views

Login to salesforce with oauth 2.0 directly from external app using ajax

I want to be able to login directly from my .net application's login (without having to use the user's security token). And I was wondering if it was possible to send my username and password to the ...
0
votes
1answer
292 views

Making API calls to third party API from Lightning component in client-side

If I want to make a API call to third party API from client side. What are security measures to be taken ? Is there a way to hide URL and Authentication parameters securely in client side ? How to ...
0
votes
1answer
230 views

Page Refreshing and Resetting Visualforce Parameters

Through a series of events, I have a visualforce component that When a apex:outputLink is clicked calls a component controller method Calls some javascript in the component The javascript calls an ...
0
votes
1answer
407 views

How to query and update a Data Extension from an external site using JQuery/Ajax?

I'm putting together an email preferences form and what I want to do is retrieve existing preferences if a record with the specified email exists and add/update a record with the customer's details on ...
1
vote
0answers
111 views

Upload error in adding attachment using ajax toolkit in visualforce

I am trying to upload an attachment to a custom object using the ajax toolkit so that I can avoid the page refresh after the upload. The solution works fine as long as session is present on the page.i....
2
votes
1answer
943 views

How to send Form Data to DE without hitting submit button using AJAX and AMPscript

I have a HTML Form with AJAX code <html> <head></head> <script src="https://code.jquery.com/jquery-2.1.1.min.js"></script> <script> function ...
1
vote
1answer
274 views

CORS error after page sits idle for a few minutes

Hi I am making an ajax call to a page on the change event of a drop down. When I first load the page it works fine, but if I let the page sit for a few minutes then try to change the dropdown it fails ...
3
votes
1answer
544 views

Lightning component not rendering dynamically created lightning components

I am trying to create a lightning component that gets data from a server and displays them in individual lightning components which are dynamically created. I built a prototype, and I am trying to get ...
5
votes
1answer
1k views

XMLHttpRequest with responseType Blob lightning

For background I have been trying to make a XMLHttpRequest to a webservice to get a blob and then eventually read the same. The call seems to be going through, the chrome network logs shows the call ...
1
vote
1answer
298 views

Custom Search Lightning component cannot read property. (community)

I have been trying to implement a custom search in communities whereby the user can type in the first line of the address and the search will update with each keystroke. But I receive this error: ...
-1
votes
2answers
45 views

actionFunction doesn't work when not using all the parameters

I'm using the actionFunction to call a method to create payments from my visualforce page. The thing that changes is the payment type (sometimes its cash sometimes its check and sometimes both). The ...
2
votes
2answers
2k views

Jquery AutoComplete in Visualforce Page

Autocomplete feature is working great but when there are two Contact blocks and when I try to search for contact then it updates both Contact blocks.How do I make sure it updates only the block that I ...
1
vote
1answer
1k views

SetRequestHeader on XMLHttpRequest not taken in account in Lightning Component

Context: We are trying to call a outbound webservice directly from a lightning component in order to avoid wasting too much resources on calls to the APEX and the target webservice (auto-completion ...
1
vote
2answers
518 views

POST Ajax method with Jquery to create new account contact and Opportunity

I am trying to create New Account, Then Contact and Opportunity that is assigned to that account . but use Post method, so have them all in one page. I dont wanna create any class, I know I can do ...
0
votes
1answer
50 views

Dependent drop-downs not working correctly with apex:actionSupport

I have 3 custom fields (select fields) Question1 , 2 and 3 . There is a dependency between Question1 and 2 ; and between 2 and 3 (using Field dependencies). I have the following VF page : <apex:...
0
votes
1answer
291 views

Error in canvas: this.getUrlParameters is not a function

I'm using canvas app from visualforce page. During the communication, when button clicked in the page, it publish event, and this should cause the canvas to create attachment(s) in SF. But I'm keep ...
1
vote
1answer
540 views

Marketing Cloud, LogUnsubEvent, AJAX, How to get Response?

I'm building a preference center page and am trying to make use of LogUnsubEvent. Microsite Structure is: Unsubscribe Page Actions Page (contains LogUnsubEvent script) When I use a form on ...
5
votes
2answers
8k views

Uncaught reference error: sforce is not defined

I have a vf component in a page which includes a static resource. In the resource, I have a apex method call. Since I am using the same resource in a custom button also, I am using AJAX tool kit ...
0
votes
1answer
443 views

How to add a picklist field in web-to-lead form?

How to add a picklist field to display salesforce account names in web-to-lead html form. please suggest any idea to do this Thanks In Advance
0
votes
2answers
366 views

Auto Complete Ajax Call URL parameter

Am having an autocomplete search box in my visualforce page with ajax call which uses a JSON static resource file to load the data. Since the JSON file is a static data source, I want to get it ...
2
votes
1answer
285 views

ServiceAppointment sObject Type not supported in Java Script Button

ServiceAppointment is a Standard object when you enable Field Service settings. I used the below code in Java Script Button. {!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")} {!REQUIRESCRIPT("/soap/...
2
votes
1answer
946 views

Is it possible to use Ajax to POST data from within a Server-Side Javascript in the Marketing Cloud?

Is it possible to use Ajax to POST data from within a Server-Side Javascript in the Marketing Cloud? Could the FormData be a problem? I've been using this code: var form = new FormData(); form....
1
vote
1answer
155 views

run assignment rule from javascript button

I have a requirement to run case assignment rule from javascript. I used the below code but the assignment rule does not run. {!REQUIRESCRIPT("/soap/ajax/40.0/connection.js")} {!REQUIRESCRIPT("/soap/...
0
votes
0answers
2k views

sforce.apex.execute is not executing method

I am using the ajax/connection js on a custom visual force page <apex:includeScript value="/soap/ajax/34.0/connection.js"/> <apex:includeScript value="/soap/ajax/34.0/apex.js"/> I am ...
0
votes
1answer
364 views

AJAX attachment upload, bad field ParentId

I have a project to upload some files for both licensed users and portal users. Got it working 98%... except for portal users.. mama mia... I created a site off a domain, logged in a user and ...