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

3
votes
0answers
17 views

Is there a way to delete record on Salesforce 1(Mobile)

Is there a way to delete a record on Salesforce 1 platform. I know there is a way navigate to sObject but if please someone could help to delete a record. Currently what i am doing to delete a record ...
1
vote
1answer
23 views

Display error or warning message without ApexPages using Global Component

I have a simple form , which has a output panel and pageMessage inside it . <apex:form> <apex:outputPanel id="errorPanel"> <apex:message id="msg" /> ...
1
vote
0answers
26 views

Is there any different calling JSON directly from visualforce page and javascript Static Resource?

I create one javascript file and call JSON from there.Before I use JSON, I use hardcode data and it works.But I try to load data using $JSON, somehow it does not works.Check the code below ...
1
vote
2answers
35 views

Change field visibility based on Opportunity picklist value

When i select stage picklist value as "Closed Lost" in Opportunity, then i want show text fields. By-default these text fields will be hide. I tried so many ways but i didn't get. tried using ...
1
vote
1answer
22 views

Unable parse JSON String using Javascript

I am facing issue parsing JSON String on the front-end. The parameter result represents a String function handleresult (result,event){ var newResult = JSON.stringify(result); var temp = ...
1
vote
0answers
22 views

Conditional Custom Buttons

I was just asked to combine 2 buttons that open 2 separate visual force pages. So my idea was to create one button(obviously). Is it possible to after that ask the user which record they want to ...
6
votes
2answers
74 views

Javascript Button Issue

Full .js button code: {!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")} {!REQUIRESCRIPT('/resource/' & LEFT(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(TEXT(NOW()),':',''),'-',''),' ',''),10) & ...
1
vote
0answers
32 views

Javascript Error : “cannot read property of Id undefined”

I have a custom button which is using the javascript code given below. I am getting the error that it is not able to get the Id. Please suggest where am in going wrong. "cannot read property of Id ...
4
votes
3answers
38 views

How to open a URL in a new tab in Salesforce1

I am currently facing an issue in opening an url in a new tab on Salesforce 1 (Mobile) platform. The sforce.one.navigateTo() method does not have any option to open url in a new tab. Any suggestions ...
1
vote
0answers
11 views

How to deploy a dynamic web project war file in heroku?

I am trying to deploy a war file in Heroku. Using Eclipse IDE, I developed a Dynamic Web Project which having basic HTML + JavaScript + j2ee files and the application is working well in my server ...
3
votes
1answer
33 views

google map not showing on Visualforce page

I am trying a very simple exercise to display a google map on visualforce page. But nothing is showing up. Below is my page code - <apex:page controller="SampleLocation"> <head> ...
2
votes
1answer
21 views

Visualforce how to onSubmit via controller return error or true

I currently have a Visualforce page where a User can tick selection boxes in order to edit multiple License Voucher # Object fields as shown below. I would like to perform a field check for empty ...
3
votes
2answers
51 views

Pass Java Script value into Apex:Input field not working

When I try to pass Java Script value into Apex:input filed no value is passed. But it works in regular html input field. Please help! . Below is my code. Which as both Apex:input & just input. ...
1
vote
0answers
21 views

Dependent Picklists - Javascript callback

Situation Dependent Picklist fields are implemented in SFDC using a JS file called "Picklist.js". This script seems responsible for adding or removing <select> tags in visualforce pages. ...
1
vote
1answer
31 views

How to call the controller Value in Javascript?

I want to display Popup Window in Edit Mode only, not in Read only.Could you tell me code or Suggestion ? My Code : Java script : function popup(){ var conf=confirm(" Would you like to copy ...
3
votes
1answer
68 views

Apex:Component not rerendering

I know that there is a similar question from a while ago but... I have a component that is not rerendering <apex:actionFunction status="waiting" name="refreshTable" action="{!refresh}" ...
1
vote
0answers
22 views

Ajax Toolkit remoteFunction Returns Timeout and Page not Found errors

I have a Visualforce web page, version 30, that contains a table of Salesforce data and two iframes. The Salesforce page itself uses the HTTPS protocol. The source of the first iframe is a ...
0
votes
0answers
35 views

Yes/No message box in Javascript [closed]

I have implemented like this var txt; var r = confirm("Press a button!"); if (r == true) { txt = "You pressed OK!"; } else { txt = "You pressed Cancel!"; } I am getting output OK and ...
3
votes
1answer
87 views

subdomain naming rules

Does anyone know the rules by which subdomain prefixes are added to org servers. Both for standard org names (e.g. cs11.visual.force.com, c.cs11.visual.force.com, manpkg.cs11.visual.force.com) and ...
1
vote
1answer
29 views

On Click Javascript - New Methods

This is a fresher question. Is it possible to create a new method as part of the "onclick javascript" code on custom button. For example the following pseudo code can explain what I am trying to ...
1
vote
1answer
38 views

How to disable and enable button depend on text value

Once click on Submit Feedback. Pop up text box open. But here by default , Submit button in disable mode.Once enter value in text area and then it should be come into enable mode (Submit).If remove ...
1
vote
1answer
40 views

Close parent visualForce page using javascript in salesforce [closed]

I want to close the page when you click on the button. <apex:page standardController="Account" sidebar="false"> <apex:includeScript value="/support/console/20.0/integration.js"/> ...
1
vote
2answers
33 views

Soft error in Standard Salesforce page

I have a requirement of showing a pop up (soft error) that will show a message when account information is not filled in the page. This is a salesforce standard page and hence there is no VF code ...
2
votes
2answers
38 views

How to load seperate VF page as modal dialog without risky Iframes?

In my custom Edit page I have a button where the user can select records and make them child records. As the edit page and the selection page must work on the same record they are currently ...
0
votes
1answer
23 views

In my apex code i'm getting hard code id error, how to resolve this type of errors?

public SiteRegisterController () { } public String username {get; set;} public String email {get; set;} public String password {get; set {password = value == null ? value : ...
4
votes
2answers
99 views

How to refresh the parent window after opening a pop up window from inline page?

I opened a Popup from an inline VF page in SFDC and then after some action I was able to close the window but needed a refresh of the Top window from inline frame . My code is as below for opening a ...
1
vote
2answers
24 views

On click javascript in salesforce mobile does not render the custom button in mobile

I have a Details Page which has Delete button of type (Details Type Button) whose Content-Source is of type on click javascript enabled. But if i keep it on click javascript enabled the button does ...
1
vote
1answer
97 views

jQuery: How to wait for Salesforce to finish rendering?

I have a small script that customises certain list views, hiding buttons. This is done using jQuery $(document).ready() Because this js is manipulating standard pages it is stored in the left ...
-3
votes
2answers
37 views

I want to display POP UP Window in VF

For example, I have 3 command buttons in same page block table, clicked 2nd command button , its needs to display "POP Button " , will we copy first command data to here ? YES or NO . like that I ...
0
votes
0answers
9 views

On click javascript in salesforce mobile does not render the custom button like <DELETE> buton

I have a Details Page which has Delete button of type (Details Type Button) whose Content-Source is of type on click javascript enabled. But if i keep it on click javascript enabled the button does ...
0
votes
1answer
47 views

How to pass onchange actionFunction's new value to oncomplete event JS?

Below is the sample code(I wrote it randomly). oncomplete of the actionfunction, javascript is being called, but the picklist value is being "undefined". I even tried $component.id, but the picklist ...
3
votes
2answers
58 views

apex:actionFunction with apex:param Param not setting

I'm trying to set a controller property, using apex:param in an actionFunction but the properties aren't being set. This is my actionFunction: <apex:actionFunction action="{!setStartEndDates}" ...
2
votes
1answer
24 views

Custom Button JavaScript Error

Here i have an issue with custom button javascript that gives the following Error. in the java script i just printed the custom label. ex.alert('{!$Label.lbltask}'); So what can i do to remove ...
1
vote
1answer
26 views

Does salesforce require javascript enabled?

I'm working on a custom visualforce page and it uses javascript/jquery to provide some functionality. Such as some of the fields are not displayed by default and are then displayed by javascript after ...
0
votes
0answers
15 views

Navigate to chatter file in salesforce1 and salesforce

I've been trying to navigate to chatter file both in desktop browser and in salesforce1 from a publisher action but I can't seem to get it working. I have a VF Page like <script ...
0
votes
3answers
29 views

Disable an outputPanel

Is there a way to disable an <apex:outputPanel> ? I have an <apex:selectList> and on the onchange event I want to disable the panel. I tried : style= "disabled: true;" But it doesn't ...
1
vote
1answer
45 views

Opening a bootstrap modal on click of a custom button on standard salesforce page

I have a bootstrap modal that I want to open on click of a Custom button on the standard Salesforce page. So for that I need to Execute a Javascript on the 'Onclick' action of the button (that'll be ...
2
votes
2answers
65 views

Call a method in controller from Component (not in Constructor)-Visualforce

<apex:component> <apex:attribute name="l" description="l" type="double" assignTo="{!Received_L}"/> <apex:attribute name="varLng" description="t" type="double" ...
2
votes
1answer
46 views

I'm getting an error invalid type cat3__c while Passing Values to JavaScript from Apex Controller Method

my vf page: <apex:page controller="ActionFunctionDemoController"> <apex:sectionHeader title="Action Function Demo" subtitle="Save a New Record"/> <apex:form > ...
1
vote
1answer
34 views

How can I access List type custom setting object in button click javascript?

Here is the code.. if({!CONTAINS($Setup.CommercientSF3__CommercientURL__c.CommercientSF3__URL__c,',')}) { ...
1
vote
2answers
48 views

Is there a way to use JavaScript on Home Page Components? [duplicate]

We can see that the support for JavaScript on home page components is being phased out as described here: ...
1
vote
0answers
18 views

Menu is not closing when Page size down

Here resize main page like mobile screen kind of size.then now click Login to community portal On dashboard/any page, click on hamburger menu. The menu list should be displayed. Again click on ...
4
votes
1answer
47 views

Refreshing a value on a Visualforce page used as a popup as a precursor to window.close if save is successful

Past performance: A visualforce that would save and then close would hit a validation rule and would then close before the user could see the Message on screen. I resolved this by putting a ...
2
votes
2answers
162 views

Using dc.js (d3.js and crossfilter) in visualforce

Today I was able to make angular.js run in visualforce. Now, I am trying to use the dc.js in visualforce to generate graphs. I create a page and this is how my code looks like: <apex:page ...
1
vote
2answers
45 views

Javascript action function not working after Summer 14 release

I have a VF page with a command button. It calls a javascript function, and then an actionFunction to call a method in the apex class. Everything was working fine until summer'14 release. Now, when ...
1
vote
1answer
64 views

Custom button OnClick JavaScript with condition (number field)

In Salesforce.com, I've created a custom detail page button that will create a new Case record from a custom object. All is working well, until I tried to add a piece that sets a checkbox field on ...
5
votes
1answer
30 views

ORs and ANDs in the retrieve function of Visualforce Remote Objects

Related: OR/AND condition for complex criteria with remote objects Background The retrieve query format allows the use of or and and clauses to create complex queries. The relevant documentation is ...
0
votes
2answers
58 views

Field Update on Button click Using JavaScript

My field is not getting updated for Owner Id on Case Object {!REQUIRESCRIPT("/soap/ajax/25.0/connection.js")} {!REQUIRESCRIPT("/soap/ajax/10.0/apex.js")} var caseObj = new sforce.SObject("Case"); ...
7
votes
1answer
130 views

Access MetadataAPI via JavaScript

We created an 100% native Salesforce IDE as a Managed Package which is using ToolingAPI and MetadataAPI via APEX. This works fine. But there is one thing which really bothers people after the ...
-1
votes
0answers
24 views

How do I enable a particular section on selecting a value from pick-list?

how do i enable a particular section on selecting a value from pick-list? using java script i am new in developing, i got an urgent requirement from client. public with sharing class Custom { ...