Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 3822

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 the functionality of some of its components.

2 votes
1 answer
492 views

Can I call my apex method from inside my JS?

isAvailable} I want to stop the JavaScript from building the page if my method returns false. Is there a way to call my method with JavaScript and stop the code from proceeding? Cheers …
Daft's user avatar
  • 2,681
9 votes
3 answers
14k views

Pass a string variable from controller into the Javascript function

I have a method which returns a Yes or No String depending on it's outcome. The method is inside a standard controller extension. How do I pass the returned String into a function on the page in whic …
Daft's user avatar
  • 2,681
5 votes
1 answer
3k views

Stop multiple scripts/plugins from being called more than once. VF Component

Preferably using javascript. Cheers …
Daft's user avatar
  • 2,681
13 votes
2 answers
2k views

Populate JavaScript array with results from apex methods

If I have two simple apex methods in my controller: public String getStringOne() { String returnStringOne = 'this is the string'; return returnStringOne; } public String getStringTwo() { …
Daft's user avatar
  • 2,681
1 vote
1 answer
179 views

Call variable from extension with JavaScript

This is my controller: public with sharing class MyController { public myObject__c myObj {get; set;} public String myObjectId; public Boolean one; public Boolean two; public …
Daft's user avatar
  • 2,681
0 votes
2 answers
194 views

Can I check for a Custom Setting in an Angular ng-show directive?

I'm working on an Angular project within Salesforce, I have a custom setting which determines whether or not certain elements on my page display or not, <apex:outputLink rendered="{!isCustomSettingT …
Daft's user avatar
  • 2,681
1 vote
2 answers
2k views

Pass apex value from one page to another

I have an outputLink like this: <apex:outputLink value="/apex/NewPage?id='xxxcccxxx'> <div class="link_class"> <strong>Link</strong> </div> </apex:outputLink> I want to pass an ape …
Daft's user avatar
  • 2,681
2 votes
1 answer
991 views

Can I append apex elements to html with jQuery?

In a visualforce page, if I have a DOM completely created dynamically with jQuery, could I append the following code dynamically too? <div id="file"> <apex:inputFile value="{!attachment.b …
Daft's user avatar
  • 2,681
2 votes
2 answers
3k views

Return list of records from Salesforce Object with JavaScript

How could I return a list of records using only javascript, with no apex: elements. My original approach was to use an apex:repeat like so: <apex:repeat value="{! … Would anyone have any suggestions as to how I could return a list of records from one object with javascript and / or jQuery? …
Daft's user avatar
  • 2,681
4 votes
Accepted

Passing variable into actionFunction and then back to JS function oncomplete

I changed my actionFunction to the following, and all is well :) <apex:actionFunction name="deleteThing" action="{!deleteAttachment}" reRender="none" oncomplete="remove_deleted_thin …
Daft's user avatar
  • 2,681
1 vote
1 answer
623 views

Update LastModifiedDate field of custom object

I'm uploading attachments to a custom object using the following JS. I want to update the LastModifiedDate field of the custom object each time I do this. Would anyone have any suggestions as to how I …
Daft's user avatar
  • 2,681
4 votes
1 answer
2k views

Can I return .getAll() in a particular order?

Can I return this data in any particular order? @RemoteAction public String unitList { get { return JSON.serializePretty(All_Data__c.getAll().values()); } } Perhaps by using ORDER …
Daft's user avatar
  • 2,681
1 vote
1 answer
193 views

Return fields from custom list setting and pass to JS

If I have a custom list setting, 'Info_List__c' with 2 fields, 'Info_Field__c' and 'Info_Name__C'. What would a method look like that would iterate through the list and return all entries. And how w …
Daft's user avatar
  • 2,681
5 votes
0 answers
863 views

'orientationchange' doesn't seem to be working in S1

Recently started using S1. Developing a web app and trying to listen out for orientation change on iPad. This works perfectly in full site mode on the iPad function doOnOrientationChange() { swi …
Daft's user avatar
  • 2,681
4 votes
2 answers
5k views

Passing variable into actionFunction and then back to JS function oncomplete

Can I pass a variable into an apex:actionFunction call as follows: deleteThing(thing_id); <apex:actionFunction name="deleteThing" action="{!deleteAttachment}" reRender="none" on …
Daft's user avatar
  • 2,681

15 30 50 per page