Questions tagged [ajax]
With AJAX (Asynchronous JavaScript and XML), web applications can send data to, and retrieve data from, a server asynchronously.
194
questions
1
vote
0
answers
19
views
Cannot direct to homepage website after login post method in visualforcepage salesforce
I want to make a button that will open and auto login to external website.
i already get the value of post like name, token and etc using ajax. But when i tried to set the url after post method ...
1
vote
0
answers
55
views
Using reRender in visualforce commandbutton after the removal of JS alert/confim
We're trying to change some confirm() in a Visualforce Page form due to the deprecation of the alert(), confirm(), and prompt() APIs when used in a third-party context.
We're trying to use the ...
1
vote
1
answer
181
views
Error on loading visualforce site
I have sites on multiple orgs which have a visualforce page. On this visualforce page in an apex:actionFunction with a rerender and an oncomplete.
The idea is to have a spinner on the page until the ...
0
votes
0
answers
464
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 ...
1
vote
1
answer
520
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
1
answer
1k
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
1
answer
2k
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 ...
1
vote
1
answer
98
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
0
answers
357
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
0
answers
330
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
0
answers
711
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: "...
1
vote
1
answer
804
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
1
answer
232
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',{
"...
0
votes
1
answer
369
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
1
answer
479
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
0
answers
407
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
3
answers
1k
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
1
answer
379
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
1
answer
747
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 ...
2
votes
1
answer
1k
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 ...
0
votes
1
answer
580
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
1
answer
385
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 ...
0
votes
1
answer
2k
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 ...
3
votes
1
answer
680
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 ...
0
votes
1
answer
917
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" >
<...
-1
votes
2
answers
102
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
2
answers
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
0
answers
120
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....
1
vote
2
answers
563
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 ...
1
vote
1
answer
2k
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 ...
0
votes
1
answer
55
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
1
answer
439
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 ...
0
votes
1
answer
1k
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
2
answers
774
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 ...
0
votes
1
answer
148
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/...
2
votes
1
answer
377
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/...
1
vote
1
answer
167
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
1
answer
428
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 ...
1
vote
2
answers
636
views
Controller values not updated with ActionSupport
I'm having a VF page which shows a table, together with 2 dropdowns and a checkbox which function as filters. Whenever a picklist value or the checkbox changes, the table should get rerendered having ...
0
votes
1
answer
109
views
JavaScript Custom Button behaviour
I have defined a javascript custom button. As soon as the button is clicked, the page should grey out. In mozilla firefox, the below code works as expected:
var $j = jQuery.noConflict();
...
0
votes
1
answer
112
views
What is the standard way to save to the database after a Web Call?
I'm trying to get a managed package into the Salesforce App Exchange. My app was rejected by the security review. One of the complaints was:
Insecure Endpoint
My company sells data about private ...
0
votes
1
answer
323
views
In Internet Explorer, JavaScript button when clicked does not have the blue border like Chrome
In Chrome when you click a JavaScript button, it will surround the button with a blue border and this indicates the user has clicked the button.
In Internet Explorer, this does not happen.
Is there ...
0
votes
1
answer
618
views
Is there any way to do an ajax call to data extension from 3rd part site html page?
I have an input text box on a 3rd party site webpage and this webpage is simple HTML page. In the input textbox, I want to validate if entered number is valid or not.
I can do this by jquery by ...
2
votes
1
answer
126
views
How to apply Apex:ActionSupport to trigger HTTP action
I am trying to use apex:actionSupport to trigger an URL (along with calling a value , c.sfprn , from {!RowList}.
Currently, dropdown menu works, but when an user clicks the dropdown, nothing triggers....
0
votes
0
answers
240
views
Call apex rest api from javascript ajax, returned successfully but no data
I made an ajax call from my client, not visual page
$.ajax({
type: 'GET',
url : requestUrl,
//add the authorization header including the access_token
requestHeaders : {...
5
votes
1
answer
2k
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 ...
0
votes
1
answer
62
views
JavaScript error on custom button
I have created a custom button with following Onclick JS Code -
{!REQUIRESCRIPT("/soap/ajax/32.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/32.0/apex.js")}
var Profile = "{!User.Profile}";
var ...
1
vote
1
answer
638
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 ...
3
votes
0
answers
218
views
Ajax REST Tooling Queries Return Null SymbolTable?
Background
I'm trying to build upon Daniel Peter's approach in his HyperBatch library to build a HyperQuery tool that will allow me to get better insight into some large tables we have without ...
5
votes
3
answers
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")....