Tagged Questions

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

2
votes
1answer
14 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
17 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
8 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
13 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
17 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
18 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
16 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
4 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 ...
0
votes
1answer
29 views

Is it possible to add custom javascript to the create (standard) object page

While looking i found out i can overwrite parts of the case feeds page. Source: http://www.salesforce.com/us/developer/docs/case_feed_dev/case_feed_dev_guide.pdf But is this also possible to change ...
1
vote
0answers
18 views

Getting error 'This page includes from unauthenticated sources'

I am new to salesforce.I have added some css classes to my vf page, but when I open my vf page it says "This page includes from unauthenticated sources". I need to click on "Load unsafe script" then ...
0
votes
0answers
20 views

Passing an input text value from one HTML page to other page using URL submission

I am using a simple web to case form > <!-- > ---------------------------------------------------------------------- --> <!-- NOTE: Please add the following <META> element to ...
1
vote
1answer
18 views

Automatically generate an account from contact with a button

I'm trying to do a button to my contacts that when pressed, it will automatically create a account with the contact fields. I have the next code: {!REQUIRESCRIPT("/soap/ajax/31.0/connection.js")} ...
3
votes
2answers
140 views

User Context of Javascript Execution

A quick (silly) question. Apex code runs under system user context. What about "OnClick Javascript" on custom buttons and javascript code in VF pages ? Under what context JS code execution run ?
3
votes
1answer
35 views

javascript pop up when user navigates away

my below code for java script pop up works very well for my visualforce page.However when i click on my save button at that moment too i receive the pop up which i dont want in my case. How do i ...
0
votes
1answer
26 views

Date Format to String Format in JavaScript Remoting

Can anyone tell me how to convert the date format to string format in JavaScript Remoting? Below is my code @RemoteAction global static theHRMS__Employee__c getEmployee() { Contact ...
1
vote
2answers
19 views

Javascript confirm() not working in Chrome Extension

I am running a chrome extension that has an input from the user in a prompt(), this will then run through a few functions and should ultimately run a confirm(). However, when I am doing this ...
1
vote
1answer
21 views

Can I use this method as the argument in a ternary operator?

I'm using the jqGrid plugin for jQuery. In the jqGrid function, I want to pass in a value for the width, but I want to pass in the value depending on the outcome of a method in my controller. ...
0
votes
1answer
19 views

javascript not working in a few systems on visualforce

I have made an assessment portal using visualforce pages and sites. It is something that is a mock DEV401 exam. But I am facing a problem. At the end of the test, when user submits his test, a ...
2
votes
1answer
31 views

How to attach file using Lightning for Salesforce1?

I wanted to attach a file to an objects's notes & attachments list. Since Aura's inputFile ui tag is in Prototype stage, Is there any other way to implement this? How to pass the Blob value ...
0
votes
0answers
36 views

How to get 'n' no of rows and columns in a table using visuaforce pages or html or javascript [duplicate]

Can any one help me out how to get this achieved in the below screen shot.I tried using Visual force pages but unable to do it.I shall appreciate your help.Is this the correct way im doing Code ...
2
votes
1answer
37 views

Use jQuery to bind to apex:apex:commandButton onComplete event

Is it possible to bind to the onComplete event for an <apex:commandButton/>? Instead of using the following format: <script> function myOnComplete(){ // do onComplete stuff } ...
0
votes
0answers
20 views

Trying to open new Window from pageBlockTable; replaces current page or new tab instead

We have a custom Service console that uses a pageBlockTable to display the recent Cases for a selected Contact. I would like to use the Case.id from each row to open a new window, as there is ...
0
votes
0answers
37 views

How to Achieve this Requirement ???Can i use Jave Script , CSS and Visual force page?

Can any one help me out , based on quote line items can we create a layout like by prepopulating items, price & qty and next 6 qtrs. Example below 2 part numbers are in quote line items, also ...
1
vote
2answers
53 views

Custom Button to Update Child Records

Can someone point me to a code sample that does the following: I want to update a custom field on all the account related contact records called relationship__c from a button on the parent account ...
0
votes
1answer
41 views

Create custom Clone button for Quote object

I have created a custom Clone button for the Quote object to clone a quote and update the record type of the new quote. The button clones the quote with the current Record Type of the record it is ...
1
vote
0answers
18 views

How to hide components until data are bound in Lightning?

What is the best way to configure components or elements to be hidden until the required data binding operations have been completed in the background via Ajax? I'd like to replicate the current ...
1
vote
1answer
34 views

Script to start multiple programs

I am trying to write a script that will start (or stop) multiple programs in one go. I have stored a list of programs in a data extension (BUList) that has the columns BU and MID. The programs are ...
0
votes
0answers
17 views

Redirect to change owner on related list view

I have a custom button on the related list called "Change Owner". I am trying to achieve something similar to the standard change owner redirection to a mass change owner page that is present on the ...
0
votes
2answers
37 views

Javascript Button - Add picklist values - Output to text area

I have about 8 picklists, half of them have values of 0 or 0.5 and the other 0 or 1 or 2. I'm trying to develop a button that will add all the values of these picklists together (picklist + picklist + ...
2
votes
2answers
40 views

problem using javascript with commandButton

I have simple javascript function that is called from the commandButton that does a simple validation check on a zipcode input. If there is a validation error I return false and if there is no ...
1
vote
1answer
22 views

Override Delete button/link with VF page

I'm trying to override the custom Account button links to allow users to merge Accounts while only allowing SysAdmins the ability to delete accounts. I had a working version of this earlier but now ...
0
votes
0answers
33 views

Hide duplicate row in VF using Javascript

I'm trying to remove duplicate rows in Visualforce using Javascript. For now, I have to do it on the UI because the underlying logic is a mess. On the bright side I'm trying to explore the use of JS. ...
2
votes
1answer
69 views

Long Text Area field in javascript custom button

I have a custom button (JavaScript) which copies the Description field from Event to my custom Object like this: summary.Discussion_Topics__c = '{!Event.Description}'; Both fields are of Long ...
1
vote
1answer
56 views

OnClick Javascript Button if statement

I have this custom button that is working var cw = window.open('/apex/CreateSample?scontrolCaching=1&id={!Servicio__c.Id}', 'Crear Muestra', "height=450,width=600"); (function detectUnload() { ...
0
votes
2answers
43 views

Accessing a map with dynamic key (a javascript string valiable )

I am in a situation where i have a map in my Apex code and i want to access its data with a key that i am passing through my javascript function. I tried with a couple of things that include directly ...
0
votes
0answers
40 views

Javascript button issue not updating the checkbox

This update is not happening: sforce.connection.update([quot]); I want show alert message for one profile when date is not equal to today . but update has to happen every time. Thanks in advance ...
0
votes
1answer
18 views

How can I store complex form in cache memory or local server

I have a requirement to store data some where other than the database. My form contains 3 Object records. Basically in constructor first record is displaying I am entering data into that after that I ...
1
vote
0answers
36 views

Show major tick on google meter gauge chart with amount as $1k , $2.5 M

I am creating visualforce page which contains a google meter gauge chart as shown above. I am showing trying to show amount in gauge but as you know representation of amount in 1K , 1M ,1B will give ...
0
votes
1answer
53 views

Reload a whole page after clicking a follow button on visualforce page

Can anyone tell me how to reload or refresh a whole page after clicking a follow button on Visualforce Page? My VFP as follows; <script> funtion reload(){ ...
2
votes
1answer
30 views

JavaScript button that deletes child object

I'm new to JavaScript and I have a requirement for a button that will delete a child object based on a query. there are 2 objects, event and enrollment. enrollment has a lookup against event. We need ...
2
votes
2answers
40 views

Lookup Populate with Javascript

Greetings and thanks in Advance! Have a visualforce page that allows a user to create a related lookup object. <apex:inputField id="newCompetitorAccount" ...
0
votes
1answer
52 views

On click Javscript on Custom Button

I have a related list ( custom object ) on Opportunity record. When I click on New button of the custom object from the related list of the opportunity , I want to check the value of some field on ...
1
vote
1answer
39 views

How to create a 100% fully custom branded Community?

I want to create a 100% fully custom branded Community like the one shown in this demo https://developer.salesforce.com/blogs/developer-relations/2013/10/communities-plus-site-dot-com.html The ...
0
votes
1answer
42 views

JavaScript executing before controller method finishes

So I have an action function which calls an apex controller method. I call this action function within some javascript at the top of my page and after that call I want to send some information to ...
7
votes
1answer
76 views

Should I add Sandbox support to VFFiddle? [closed]

I'm working on some updates to to VF Fiddle. I want to gauge the interest in running fiddles in sandbox and get some feedback on the security concerns. Because fiddles are not reviewed they could ...
2
votes
1answer
117 views

Critical Update “Serve Static Resources from the Visualforce Domain” still serves resources via Salesforce Domain

After activating the Critical Update, I checked a couple of my orgs using Managed Packages which provide resources used on buttons and scripts in the Standard Salesforce domain. It surprised me that ...
0
votes
1answer
28 views

can i make a ajax post from a salesforce button

I have a button on salesforce record page which calls a url with parameters from a post call is made . Is there a way i can make post call from salesforce button directly?
2
votes
0answers
55 views

Javascript in custom button

I create a custom button with the send email features, so if the margin<0.4) show alert, than can't send the email. I create the button but doesn't work, Somebody can help me? Thanks a lot. ...
1
vote
2answers
39 views

Add transparent color code in apex tag

Hi in my meter gauge I have to add a transparent white color <apex:gaugeSeries dataField="size" donut="50" colorSet="#78c953, #FFFFFF" tips="true" /> i.e. I need: colorSet= "#78c953, ...
1
vote
1answer
40 views

Javascript to delete rows from a queue

I have javascript on my visualforce page that adds a delete button beside each new case added to the queue but cannot get this button to actually delete these items. This is the code I have so far. ...