Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Make your voice heard. Take the 2019 Developer Survey now

Questions tagged [ajax]

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

0
votes
1answer
20 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 ...
-1
votes
0answers
15 views

Is there any way to identify broken both external and internal links in Lightning Component?

I understand that we can use AJAX for this, but as I can see we have to add every external endpoint to CSP trusted sites in order to make test callout. So maybe there is a way we can check that links ...
2
votes
1answer
84 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
1answer
53 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
1answer
57 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
1answer
76 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
1answer
58 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
1answer
18 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
0answers
160 views

CORS error - Web-to-Case and reCaptcha

We are trying to implement reCaptcha on a Web-to-Case contact form, but encounter the following error Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at ...
-1
votes
2answers
24 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 ...
0
votes
1answer
312 views

Submitting web-to-leads with AJAX instead of embedded form

I am attempting to make my SalesForce form work with a redesigned form using AJAX instead of a simple jQuery submit function. I don't understand what I am doing wrong. Right now after submitting the ...
0
votes
0answers
24 views

Language has to be specified in HTTP header

Salesforce endpoint accessed thru AJAX: $.ajax({ type: 'GET', url : 'https://ap5.salesforce.com/services/data/v42.0/support/knowledgeArticles', headers : { 'Authorization' : 'Bearer '+ '...
2
votes
2answers
417 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
0answers
42 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....
0
votes
0answers
45 views

delay on callback of new sforce.SObject ajax call

im creating SObject("Attachment") the problem is depends on how big is the file usually it take some amount of seconds do get the results. I have onSuccess function it returns but even with the ...
1
vote
2answers
133 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
1answer
262 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
1answer
30 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
112 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
0answers
437 views

creating input type=“file” html instead of apex:inputFile Salesforce

I wanna create input type file instead of using apex:inputFile because of limitation on framework. The problem is im attaching large files and my code get broken. this error message that I get from ...
0
votes
1answer
64 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
166 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
1answer
39 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
1answer
81 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
1answer
223 views

Salesforce LiveAgent Rest API 400 Bad Request Error

I'm trying to make a simple REST GET request to salesforce Live Agent API to check whether service is available. I can make the simple GET request successfully from my Web based REST client (Chrome ...
1
vote
1answer
116 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
1answer
140 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 ...
0
votes
0answers
372 views

Id not specified in an update call, MISSING_ARGUMENT

After completing the form I have such an error in the response: {"success":false,"data":[{"code":"salesforce_update_data_error","message":[{"errors":[{"message":"Id not specified in an update call","...
1
vote
2answers
170 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
1answer
48 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
1answer
67 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
1answer
40 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
1answer
255 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
1answer
84 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
0answers
102 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 : {...
4
votes
1answer
536 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
1answer
50 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
1answer
261 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
0answers
104 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 ...
4
votes
2answers
809 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
0answers
29 views

Web & Mobile analytics Track Purchase Details with AJAX Redirector Call [closed]

I want to use use ajax call to track purchase items. I found this documentation but it's not very clear in particular how compose the url to pass to the function.
0
votes
2answers
965 views

How to rerender an outputpanel after remoting completes

I have a repeat control that populates commandbuttons(view,edit,delete) for each record of an object. On click of a command button I want to delete the respective record and render the containing ...
4
votes
1answer
2k 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 ...
1
vote
3answers
385 views

what happens behind the scenes of salesforce remoting

I am new to salesforce and Apex programming. We call remoteactions from javascript in 2 ways. 1.By using namespace.controller.method 2.By using Visualforce.remoting.Manager.invokeAction pattern. I ...
0
votes
1answer
192 views

How do i trigger a form submit after validating with <apex:actionFunction>?

I have a form that i need to validate 1 field by the controller, what is the right way to to preform validation with the controller and by the answer to preform form submission?? Heres the VFP code: ...
1
vote
0answers
134 views

Ajax call to data extention

Client want 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 ...
1
vote
1answer
15k views

Response status is '0' in jquery ajax

I'm using a jquery ajax for storing a data in the database. I call a service through a url and send data to it in the following way: $.ajax({ type: "POST", url: "http://192.168.250.118:8080/...
0
votes
1answer
2k views

how to insert ajax result json format into Datatable?

$.ajax({ url: "apex/demopage", success: function(resp) { } }) //and my resp coming as follows [ { "attributes": { "type": "something", "url": "...
5
votes
1answer
537 views

How To Stop actionPoller After Set Duration?

Can we stop the <apex:actionPoller> from executing after a set duration?
0
votes
1answer
89 views

Populate a form field based on lookup value by AJAX

I am having a bit of trouble with working out how to populate a field on my custom object based on the selection of a related object record via lookup. I have 2 custom objects - Case_Item__c and ...