Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Questions tagged [javascript]

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.

Filter by
Sorted by
Tagged with
1
vote
1answer
1k views

Adding Date and Integer in jQuery

<script type="text/javascript"> function duedatecal(){ var dmy = $(".invoicedate").val().split("/"); alert(dmy); // it is in the format of mm/dd/yyyy var invoicedate = new Date( ...
1
vote
1answer
6k views

VisualForce page with custom controller and lookup causing JavaScript UI issues

I noticed that I'm experiencing UI issues with every Salesforce instance that I have access to when I create a custom VisualForce page using a custom controller and that I display a lookup field on it....
3
votes
1answer
2k views

Enabling a field in input page based on a picklist value

VF page to enable one of two fields based on picklist value in the same page. Please verify my code whether is right or worng. I am running this code but nothing happen. <apex:page ...
2
votes
1answer
2k views

Cross-site Scripting (XSS) in security review.?

I am getting Cross-site Scripting (XSS) while scanning in force.com scanner.if i remove javascript there is no error..what to change in javascript code..please help its quite urgent...may be encode ...
2
votes
2answers
366 views

Date coming back in wrong format using JS remoting

I return instances of an APEX Class in a JS remoting API. public class OpportunityDetail { ... public Date closeDate; ... The problem what is returned to my JavaScript client code is ...
2
votes
1answer
2k views

Creating a VF page dependent picklist error?

I am creating a VF page, on that we need to have 13 picklist fields and 13 dependent picklist fiields. We have created 10 picklist fields and 10 dependent picklist field. For creating 11th dependent ...
2
votes
1answer
6k views

Custom Button Javascript - send Validation Error Text to screen?

Is there a way to send (if any) the Validation Error text to such a button, shown below? I would put it at the "Error" text at the end, if possible. I cannot find a reference to this in my searches. ...
1
vote
2answers
2k views

Apex:include should only rendered When onclick event occurs

I'm having a page Say VFPage1 with class apex1 In my page2, my code is something like this var arr = document.getElementById("contactandaccount"); alert(arr); //getting null here <apex:define ...
1
vote
1answer
2k views

Display javascript result in a pageblocktable

I am making a Ajax call to a REST API and parsing the response and maintaining the parsed values in a delimited string. I want to display the same string in the pageblocktable without taking the ...
1
vote
1answer
1k views

Hiding chatter feed in service cloud console

We have a requirement to hide the chatter feed for Accounts for service cloud console users. The chatter feed is contained within two divs on the Account page, with ids 'feedLinks' and '...
2
votes
3answers
4k views

Passing apex:inputField user entry as parameter into Command Link

I am getting the nickname from an inputField and updating a list of strings and displaying the list of strings on a table. The outputField displays the newly entered value, but the controller variable ...
1
vote
2answers
3k views

How do we get a id of field from a apex:pageBlockTable?

I have a pageblocktable where i do have some input fields which also has a apex:inputtext and has a lookup icon on click of which i am calling up the native lookup. The issue i am having is with the ...
2
votes
1answer
8k views

send email button from custom object

I am a newbie, and that's the probably reason why I am lost with this problem. I have two email templates created (one for students, and another for professorial). There is a custom object, and I need ...
1
vote
1answer
2k views

Dynamic table in salesforce using HTML

I have a list of record in my controller. I want to display the record into my VF page but don't want to use salesorce components want to display the list into a HTML table 1 by 1. How to achieve this....
1
vote
0answers
212 views

How to embed a standard delete page into a custom console?

I have a custom console, with the essential registers and the user can delete an object through this page. When he click on Delete I want show him the standard delete page without the sidebar and ...
3
votes
2answers
1k views

parameters wont passs via Javascript

I am having trouble passing values via Javascript. APEX PAGE: //STUFF HERE <b>First Goal:</b><br /><br /> Goal:<apex:inputField id="Goal" value="{!Account_Plan__c....
2
votes
1answer
2k views

Custom Button for Convert Lead with Javascript

I would like to prevent users from converting a lead if some fields are missing (State, country, company type) - I don't want to use standard validation, as I want the users to remain on the same ...
2
votes
3answers
2k views

Standard Button CODE Available?

Is there a repository of the actual code behind Standard Buttons? Specifically, I'm looking for the code for "New" (and in my case, it's for use within a Related List on Opportunity). I want to ...
3
votes
1answer
2k views

Can't update record with Javascript remoting

I'm using JS function to get a contact record and another function to update the record after hitting save. getRemoteContact() works beautifully, but saveRemoteContact() only works at random. I've ...
-3
votes
1answer
545 views

Visualization chart not being displayed

I'm using the code below but it is no showing any chart, is there an obvious reason why? < script type="text/javascript" src="http://google.com/jsapi"></script> <script src="/...
0
votes
2answers
4k views

How can I redirect the page to navigate to a new record (Case) that was created with a custom button?

I have a custom Javascript button on Opportunity Layout that executes a method that creates a case. After the alert says "Case Created" and User clicked OK, I want the page to redirect to the Case ...
4
votes
1answer
3k views

Manage (and re-use) apex:pageMessages from Javascript

I would like to know if is possible to set and show a apex:pageMessages block from javascript I've been trying to do something like this: VF page: ... <apex:pageMessages id="jserror"/> ... &...
2
votes
2answers
3k views

Setting color for multiselect picklist

EDIT:Sorry for not specifying this critical part. I want this to be done on a Multi select picklist on standard salesforce *(even if it means hacking the side row by adding a dummy component) and not ...
-1
votes
1answer
10k views

HTML5 FileReader API & IE Support (reader.readAsBinaryString) [closed]

I have trouble reading the Uploaded File (XLSX) via FileReader API's "readAsBinaryString" method in IE10. "readAsText" method works fine. Has anyone come across this, does IE support this method? Am I ...
4
votes
2answers
9k views

Call apex method and JavaScript from html button

I have a custom search page for use in Customer Portal. VF Page: <form name="frmSearch"> <input type="text" name="keyword" id="keyword" value="{!portalSearchModel.searchTerm}" ...
3
votes
0answers
2k views

XLS Read and Automatic CSV conversion

We have a requirement to read contents (rows) from an XLS file and upload (the file as an attachment) the same once the read and insert into custom Objects are complete. My observation after ...
6
votes
2answers
2k views

Is <apex:includescript> cumulative?

If I have two components (on a single page) that both reference the same JavaScript Static Resource using an <apex:includescript> tag, will the script be included twice?
2
votes
1answer
1k views

Does $Action.New not prompt the user to select Record Type?

I have Task object with few record types. I created a custom List button on the task object and placed it on the related list of few objects. When i click this button i expected that it would prompt ...
4
votes
3answers
6k views

How to hide a apex:pageBlockSectionItem by Javascript

I'm hiding a field row (apex:pageBlockSectionItem) using the next code: VF: <apex:pageBlockSectionItem > <apex:outputLabel value="My nice field" for="myField"/> <apex:...
3
votes
2answers
6k views

Refresh the page on complete of execution

I have a detail page button which calls a webservice class. Its some thing like: sforce.apex.execute(Class, method, {paramName : Param}, { onSuccess: success, onFailure : failure}); I need to ...
-1
votes
1answer
2k views

Jquery event handler does not fire after Visualforce table refresh

I am using the Datatables library together with visualforce to create a funky table but I am having "funky" issues to get it running properly. Basically I have a button that will query the Salesforce ...
-2
votes
3answers
4k views

need to display selected Values through javascript

My VF page is something like this <apex:page standardController="Temporary_Contact__c" extensions="tempView" > <apex:includeScript value="{!URLFOR($Resource.jquery)}"/> <script ...
4
votes
2answers
2k views

Need help text of more than 255 characters

I need to use helptext with one custom field in Visualforce but Salesforce it allows 255 characters in helptext with a field. One solution is to create an image of text and show that image onMouseOver....
11
votes
2answers
3k views

Funny behavior with components, javascript, and rerender

Has anyone else seen something like this? 1) Create a component that includes a javascript block (OK, the code is overkill, but pretend it's actually doing something): <apex:component layout="...
18
votes
1answer
2k views

Is there a security risk with JavaScript Remoting, escape = false

Initially I thought the answer to this question was yes, so malicious JavaScript cannot be injected into the page if it is in the response. Yet upon a further look at this question it is a lot harder ...
0
votes
1answer
1k views

Comparing dates using javaScript

I am try to write a validation rule using javaScript. Date range should not be greater than 90 days.In order to do that,I have created two date fields and directly access in Visualforce page and the ...
2
votes
1answer
213 views

JS remoting question

I am a newbie to SF. We have a spring MVC application. The controller returns the result as JSON object. My task is to call that controller method using JS remoting and display the results in ...
2
votes
2answers
4k views

Issue with passing parameters in Service Cloud Console Integration Toolkit

i am currently having certain hyperlinks in VF page which i need to make compatible in service cloud and hence using the API toolkit.I am quite new to callback methods, what is the syntax to pass ...
4
votes
1answer
4k views

Use of (BlockUI) plugin in jquery constantly breaks Visualforce pages

ADDED DETAILS: The problem appears only on those VF pages where a custom homepage component uses another version of jQuery. Those component seems to load later and overwrite the jQuery object that was ...
8
votes
2answers
8k views

How should I properly format a Date within an SObject parameter to a RemoteAction method?

I'm having trouble sending Date values from the client with remoted methods. If my RemoteAction method takes a plain Date value, everything works fine with the suggestion of using "toUTCString" which ...
4
votes
2answers
3k views

Load and execute Javascript on the fly (Stored in static resources some other place) with SFDC Buttons on layout

Use Case - There is Javascript execute button on Account page layout named 'Update Account' - {!REQUIRESCRIPT("/soap/ajax/25.0/connection.js")} {!REQUIRESCRIPT("/soap/ajax/25.0/apex.js")} //...
5
votes
1answer
273 views

Is there away to pull a users standard layout in edit mode and place it on a VF page?

I know there's a ways to do this using tag to view the detail page, but once you hit edit it will use salesforce standard edit page. I've also created a custom edit page but the problem I'm running ...
2
votes
4answers
2k views

Reading a csv file(document) in Jquery

We have a requirement where we want to read a csv document in Jquery / Javascript. We are able to read the file from documents (via query) and Static Resource inside the controller and then pass it ...
2
votes
2answers
3k views

Populate lookup field on Object after Clicking a custom button and creating record on different object

I would like to create a custom button on service contract to create an opportunity. I want to populate a lookup field between service contract and opportunity (So I will be able to use it for some ...
4
votes
1answer
218 views

Is using a class a good option for creating a new Object and how could I send an error string to javascript?

Thank you for taking the time to look into my question, this is my first Apex/Salesforce project, I am familiar with Java and javascript. I have been tasked to creating a new Object called 'Service ...
4
votes
1answer
699 views

Visualforce Remoting and Relationships

Question Is it possible to leverage relationships with Visualforce remoting, including one object as a property of another? Background I've been playing around but always seem to get a VF remoting ...
1
vote
2answers
4k views

onmouseout Event after clicking on link

Here after clicking on the link onmouseout event should be called.I'm very poor in Javascript & need help in this Required something like this when I enter into the block of reporting,& ...
-4
votes
2answers
1k views

Checkbox field popup

I have a checkbox field, and i want if user checks that field then it should ask are you sure,if press ok then it should continue otherwise not?
3
votes
2answers
592 views

Lookup displaying JavaScript error (Internet Explorer)

One of our user is receiving a JS alert when filling a lookup (from a custom object). error: { faultcode: 'soapenv:Client', faultstring: 'Attribute "xmlns" bound to namespace "http://www.w3....
2
votes
1answer
1k views

What fires the activity reminder pop-ups in Salesforce?

Is it tied to a page load? If so, which pages? Or some other element inside the page? Sidebar maybe? Is it possible for a packaged app to interfere with the reminder pop-up function? I'm trying to ...