Javascript is a weakly typed interpreted programming language primarily implemented by web browsers to allow for client-side scripting. It can be used in Visualforce pages to give a more dynamic experience to end users. Additionally, the Visualforce engine generates and uses JavaScript to support ...

learn more… | top users | synonyms

0
votes
1answer
13 views

Dynamic Filter to query from visualforce chart

I have one requirement. I have to create dynamic report on task object, dynamic in the sense i have to get users name in a drop down list and if i select any user and click on "get report" I should ...
2
votes
0answers
26 views

Can you retrieve more than 2500 records with SSJS?

I am trying to use a script activity to update a data extension with the statuses of subscriber records. I have managed to get the code working but it will only add 2500 records. I have been reading ...
1
vote
1answer
18 views

Action Function not working

I have to upload a file using HTML input file and create a case and attach it to file. I am ablt to acomplish this using Javascript. Now I want to send the case Id to the controller. But I am not ...
1
vote
2answers
23 views

Is there a way to connect directly to Salesforce's REST API directly from JS? [on hold]

I get a cross origin error when I do an AJAX call, and am wondering if there´s a way to solve that. Thanks!
1
vote
1answer
43 views

Return apex page message to Java script alert popup

I want to show the error message on Javascript alert popup.Is it possible? I have a custom detail button which calls below page and creates a related record.If related record exists then I want to ...
0
votes
0answers
12 views

REQUIRESCRIPT for zip files? [closed]

I was reading this page End of javascript sidebar workarounds? in reference to the javascript includes. I need to be able to include the old way by including a whole package. When I use the ...
3
votes
1answer
71 views

How do you pass a global variable ($User) into javascript in Salesforce Visualforce?

How do you pass a global merge field type $User into javascript? I'm able to pull the User First Name into the HTML with the below HTML, but I would like to pass the User First Name into the ...
1
vote
2answers
24 views

List Custom button issue in Chrome

I am using List button in Listview as content source of OnClickJavascript, here am using three custom buttons one button is working perferctly. But another two buttons are not working in Chrome, these ...
0
votes
0answers
14 views

Cache results of VF remote objects

I am doing a simple remote object query to get the smallPhotoUrl and display it on every page as part of a custom branded community. The problem is that every page has to rerun the query and display ...
0
votes
1answer
24 views

Action Method and JavaScript Function

Can anyone tell me how to execute the action mthod as first and javascript function as second based on the result of action method. My problem is: I have command button which has action method and js ...
0
votes
1answer
11 views

Is it possible to feed a VisualForce Table's var to a JavaScript as a parameter?

Let's say my VisualForce has a table like: <apex:pageBlockTable value="{!someObjectList}" var="someObject"> <apex:outputText value="someObject.id" /> </apex:pageBlockTable> ...
0
votes
1answer
9 views

How to use styleclass attribute in JavaScript

Can anyone tell me how to change the style class property dynamically in Javascript. Below is my sample visuaflorce page <script> function changeFont(input, textid,btnid) { ...
0
votes
0answers
16 views

jquery accordion with salesforce not working properly

<apex:page > <script type='text/javascript' src='http://code.jquery.com/jquery-1.7.1.js'></script> <style type='text/css'> .accordion{margin:50px}.accordion dd ...
1
vote
1answer
16 views

visualforce remote objects get current user ID

I am trying to use the new visualForce remote objects to get information about the current user. I have usr.retrieve({ where: { UserID: { eq: '' } }, limit: 1 }, ...
0
votes
1answer
17 views

OnClick javascript id issue

I am using List custom button in Listview once i select the records through checkbox then the script will call and get the list of id's and pass to apex class methods. But here am getting not the ...
1
vote
0answers
16 views

RunApex missing method parameter with ClickToDial on objects with special characters in the name

I am using a custom console component that listens to ClickToDial events and calls the sforce.interaction.runApex method from the openCTI API. ...
0
votes
3answers
19 views

Dynamic Hide and Show

I have the following piece of code where I want to dynamically hide or show div tag having a component on click of a button.. How can we achieve this? <apex:page sidebar="false" title="Article ...
1
vote
1answer
18 views

Mass update child records using apex class visualforce page with javascript

I'm having a problem in using javasacript to display an error while mass updating a child record of an opporunity once I found the picklist ed_sp_ls__c='return' and the value ed_vpo_n__c=0 of at least ...
0
votes
0answers
16 views

How can I get knowledge article inline rather than taking it on next page?

On the click of title it navigates to the next page, i want to have a behaviour like javascript hide/show buttons. But I am not able to achieve so. I tried with Iframes as well, but then only one '' ...
0
votes
2answers
26 views

Open a Visual force page as pop up from another visual force page with parameters

I am having a visual force page with a button. On click of a button, I need to open another visual force page as popup. Also, I want to parameters through that as well . I am able to do so using ...
2
votes
1answer
23 views

Can I call my apex method from inside my JS?

If I have a page like this: <apex:page standardController="controller" extensions="other_controller"> <style> </style> <script> ...
1
vote
1answer
24 views

Visualforce error when logged in as customer community user

I have a custom VF page that uses some JS to give a different "MyProfile" page experience in a Community. It worked fine. I logged in as a customer community user and all was well. I made a change ...
1
vote
1answer
42 views

Dynamic personalized variable not working with server side JavaScript function

I am doing the following code in ExactTarget landing page: %%[ VAR @Rows,@email,@rowCount SET @Trigger = QUERYPARAMETER("Trigger") ]%% <script runat="server"> Platform.Load("core", "1"); var ...
0
votes
2answers
31 views

How to pass a VF controller list to a VF/javascript table

Please I need to put a list var "who I received from controller" in the JavaScript table and brows it. This my code : Public class Controller_OlympusLR_addMultipleVouchers { public ...
2
votes
0answers
50 views

Filtered lookup fields don't work in Visualforce when records wrapped in Object

I have a grid Visualforce component that displays records as rows where fields are editable as apex:inputField. The component works for generic SObjects and uses fieldsets to defined editable fields. ...
1
vote
1answer
39 views

Can we pass a Personalization String in Javascript Function in ExactTarget

In ExactTarget, can we pass a Personalization String in Javascript Function? So I Have function as below. e.g. var DE = DataExtension.Init(DataExtension); I have dynamic variable for the name of ...
0
votes
1answer
52 views

Javascript not working in ExactTarget Landing Page

I am using a simple JavaScript to receive a row from Data Extension Server-Side JavaScript Functions in ExactTarget and display the retrieved row on Landing Page . As below <script ...
0
votes
0answers
35 views

passing checkbox value with javascript variable to Apex Controller

<script type="text/javascript"> function chckIsPrivate() { var isprivate = document.getElementById('{!$Component.theForm.searchresults.isprivate}').checked; } ...
0
votes
2answers
65 views

How can I show and hide an inputText field based on a checkbox checked state?

I am using <apex:selectcheckboxes> and wondering how to get all the selected checkboxes values in javascript. On the click of a checkbox I'm calling a Javascript function showOtherPlatforms(). ...
3
votes
3answers
38 views

Google Maps - Array of Locations from SOQL List

How could I populate a javascript array like below, from a SOQL Query? var DemoLocationData = [ [49.2812668, -123.1035942, "26 E Hastings St, Vancouver" ], ...
1
vote
1answer
16 views

How can we access cookies created by APEX Cookie Class in Javascript

How can we access cookies created by APEX Cookie Class in Javascript I have created a cookie in APEX code, but now i want access that Cookie in salesforce, how can i achieve that, or guide me
1
vote
0answers
49 views

How to pass Client side variable to server side variable?

In form I have check box. during runtime i have to get the value of the selected check box in the Page. if i use client side java script means the output will display. <script> function ...
4
votes
1answer
23 views

Included StaticResource javascript cannot call RemoteAction

I am trying to call a RemoteAction in an Apex Component. Every time I get the error 'unable to invoke action, no controller and/or method found'. I have reduced the function to one with only 1 ...
1
vote
2answers
59 views

I need to get the values from checked checkbox and insert into Data Extension using AMPScript

<script runat=server language=javascript> function checkstatus() { for (count = 0; count < cntrl.value; count++) { if (form1.ordercheckbox[count].checked === true) { ...
2
votes
0answers
19 views

Is it possible to include a Mustache.js Template saved to a Static Resource within a VisualForce Page?

My VisualForce page includes the following Mustache.js template code: <script id="template" type="x-tmpl-mustache"> ...
4
votes
1answer
26 views

Solving Race conditions with ActionFunctions

I have had a big problem with race conditions in ActionFunctions corrupting my viewstate. When I call an AF to update one thing, and then click a button to do another, if the second finishes first, ...
3
votes
1answer
63 views

JavaScript Custom Button for updating Case Fields

I want to update some case fields and populate an email template via a custom JavaScript button. Thanks to your answers to questions in the stackexchange, I created buttons that do that but send out ...
0
votes
2answers
37 views

Page reloads on Clicking apex commandlink though reRender is set to None

I have an issue in apex:commandlink ,On clicking apex commandlink the page gets reloaded though i have set my reRender property to none.This works in chrome but not working in firefox and IE this ...
1
vote
1answer
36 views

Communication problem between pages and controller

Hello I am a new user sales force, My view takes a variable from the controller and displays it onto the view, however, the page seems to refresh back to the initial state(without going back into the ...
3
votes
1answer
51 views

How to add multiple checked records

We have a loop that adds multiple records to a form allowing them to select various options. How can we post the values that are checked for each selected option? <fieldset ...
1
vote
1answer
42 views

How to find whether Google Maps API is licensed or not? [closed]

I am using Google maps API in my salesforce application. I am using this javascript file https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=places to integrate my application with google ...
0
votes
1answer
21 views

Call send method from command link

I have a send method outside constructor in apex class. I need to call that from Command button onclick. Can someone help me here? Send method: public PageReference send() { String ...
2
votes
1answer
31 views

Can I move this JavaScript function which VisualForce used out of the global namespace?

Currently looking at Refreshing Chart Data Using JavaScript Remoting Reading about JavaScript best practices, I came across the idea of keeping functions out of the global namespace, so I tried to ...
0
votes
1answer
27 views

How can I make my VisualForce JavaScript load from a separate page?

Looking at Refreshing Chart Data Using JavaScript Remoting I'd like to move the script onto a separate page, to make it more maintainable and reusable. I tried moving the entire script into a static ...
0
votes
1answer
22 views

Why doesn't this VisualForce Chart with data built in JavaScript render?

Currently looking at Providing Chart Data via a JavaScript Array As per the example, data is embedded and returned by the JavaScript's dataArray property. However, the chart does not seem to do ...
0
votes
2answers
56 views

How can I define my Remote Action Apex Controller class for JavaScript in a VisualForce Page?

Currently looking at Providing Chart Data Using a JavaScript Function The chart is not rendering for me; not at all, though I have confirmed that the JavaScript getRemoteData() method is attempted. ...
0
votes
1answer
29 views

Closing a VF popup window from a wordpress site

I have a Visualforce page exposed through force.com site. This page is exposed through an iframe in a popup (in a wordpress site). The page has some information to fill up and on the click of submit ...
2
votes
1answer
38 views

outputText number formating with space a thousand separator

How do I format a number in an outputText element so that it uses spaces as a separator between thousands? What I currently have is an outputText element which formats number using comma as a ...
1
vote
0answers
25 views

Gauge Chart change colorset with javascript

I want to change dynamically the colorset of my Gauge Chart. I tried to use the property "rendererFn" but nothing happened, the color didn't change. Apex Page : <apex:chart data="{!data}" ...
0
votes
0answers
17 views

Search in specific fields of object using searchAndScreenPop api in Open CTI

I was testing the Demo App available for Sales Open CTI on the following link: https://developer.salesforce.com/page/Open_CTI In that there is functionality of Screen Pop, which pops open a screen ...