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
2
votes
0answers
357 views

Error Generating Quote PDF

I am trying to generate QuotePDF on click of a JS button. I have not created any VF Page for the PDF and am trying to use the standard functionality. My code to generate PDF is:- PageReference pr = ...
0
votes
2answers
890 views

The VF page is in a pop up window. When the Case is created I want the parent window to redirect to the newly created Case

Have a link that calls a VF page for a user to fill in required fields then create a Test Record. The VF page is in a pop up window. When the Test__C is created I want the parent window to redirect ...
4
votes
3answers
1k views

Grids in Visualforce pages

Has anyone tried using Grids in VF pages using jquery plugins or any other libraries. I am looking at an library plugin which provides an excel like UI. The basic idea is to have custom object fields ...
1
vote
1answer
1k views

Not changing Javascript variable value after rerendering

i created a script tag in visualforce <apex:page controller="ActionFunctionDemoController"> <apex:form > <apex:actionFunction name="action1" action="{!action1}" rerender="...
5
votes
2answers
12k views

Javascript Execution on Button Click with Service Cloud Console

I've always setup buttons to execute javascript on click so I can properly render the new page/tab based on where the user is at (cloud console or standard view). Today upon testing this exact bit of ...
0
votes
0answers
532 views

Home component JS to hide a button

So I wanted to hide the "save & new" button on case edit page layout. So I added a home component, Narrow Left column and in the body click on show html. < !--------Wait for the loading of ...
10
votes
1answer
2k views

Spontaneous Internal Salesforce.com Error - What do I do?

I have a piece of code that has been working for the past few months without problem until recently. I cannot say to the exact day this started happening as this is still in a testing phase and this ...
1
vote
1answer
1k views

<Apex:param> not passing value with Onclick function in PgBlockTable

Am nw to salesforce & Need you assistance. I will explain my scenario. I use 2 custom objects Volume and Quality. I have done all part. I have trouble in onClick() function.In a pageblocktable, I ...
1
vote
1answer
275 views

Filedownload by dojo script

I am trying to download a file by referring to below link and code. http://www.salesforce.com/us/developer/docs/ajax/Content/sforce_api_ajax_queryresultiterator.htm#base64issue But for some reason ...
0
votes
1answer
2k views

calculation from input field using visualforce page

The TotalValue__c field being calculated on the fly/client side while the user is entering the field values and and so that they don’t have to do the calculation themselves. TotalValue__c = ((...
3
votes
1answer
340 views

Changing the value of particular pageblock on click using jquery/jscript

I have an scenario where pageblocks in visualforce are dynamically rendered based on the list size. In each page block i am performing some calculations OnKeyup using javascript and JQ and result is ...
1
vote
1answer
415 views

Creating a pop up message when the user exits the page or exits the browser [duplicate]

i need to create a pop up message on one of our visualforce pages which when the user tries to leave the page or exit the browser when data has been inputted into the inputfields and hasnt pressed the ...
1
vote
1answer
687 views

Issue with conditional statement in apex:repeat inside javascript

I am trying to create a map in javascript using apex:repeat tag but it's not working as per expectations. Below is the VF page and controller I have created : <apex:page controller="...
3
votes
1answer
2k views

Smart Capture Form Field validation on ExactTarget using JavaScript

I have a landing page that contains a Smart Capture form that sends data back to a custom Object in Salesforce. The form is functional and works as needed. I would like to add custom JavaScript code ...
0
votes
1answer
2k views

Make enter key execute controller method

I have an inputText being used as a search bar along with a commandButton that when pushed executes the search method in my controller. What I would like to add is that when the user pushes the enter ...
2
votes
3answers
950 views

search bar accessing apex controller variable in javascript

<apex:inputText id="searchBar" value="{!nameSearch}"/> <apex:commandButton value="Search" action="{!search}" rerender="Everything" status="statusId" onclick="if({!nameSearch}.length() < 3){...
0
votes
2answers
4k views

How do I get pass the id of the inputfield to a javascript in visualforce?

Forgive me if this is very easy to do, but I'm having problems, specifically, no ID gets passed to the javascript. I have MULTIPLE input fields defined like this <pageblock> <...
2
votes
1answer
2k views

Passing ID of an apex:inputfield to javascript

I'm new to developing visual force pages and forgive me if this is an easy question but I'm having problems getting the ID of an apex:inputfield and passing it to javascript. What I'm trying to do is ...
0
votes
1answer
1k views

Collapse functionality in visualforce [duplicate]

I am creating collapsable pageblocks in visualforce and im new to visualforce i tried implementing the following code but its not working and throwing error in jquery file like Refference error $...
1
vote
0answers
178 views

We can click any record it refreshes with in page

My Requirement is: i have created a custom visual force page. in that one custom object have a number of records, when we click on one record it goes to another tab, But my requirement is it ...
3
votes
1answer
245 views

VFRemoting escape option

We are currently looking into the best place to handle escaping (html encoding) when using VFRemoting. It had been suggested to us that using always the option {escape: true} was the best approach ...
1
vote
1answer
3k views

Onclick Javascript Method problem- No such column 'ProfileId' on entity 'User'?

For the life of me, I can't figure out what's going on here. I'm getting a javascript error when the query doesn't return any users. It's coming up sporadically. what's going on, and what should i do?...
1
vote
1answer
184 views

Mobile SDK - whitelist URLs cordova 2.3.0

I need to download some files with cordova with the mobile SDK. Apparently I need to allow the remote origin to download the file because I keep on getting http status 401 when I use the FileTrasnfer. ...
2
votes
1answer
78 views

How can I have a form send users to a different page after submitting a form?

I created a web to lead form from salesforce that creates a case, when the user submits the form they are taken to thanks.html. I added a new field and need the user to be sent two one of two forms ...
3
votes
1answer
125 views

Referencing js library from static resource or from the hosted server in a visualforce page. Which approach gives better page performance?

I am just curious to understand if there is any difference in page performance between referencing a js library from static resource inside of Salesforce or referencing from a hosted server in a ...
1
vote
2answers
5k views

Cloud Console: How do you refresh primary tab from a subtab

I've been trying to refresh a primary tab from a subtab with no luck, and would like a working example. According to their doc, they do not give an example of how to retrieve your primary tab's id ...
2
votes
0answers
239 views

Javascript not supported in SAP WebdynPro or WebGUI. How can a canvas app subscribe in that situation?

I am in a position trying to submit a Canvas POC to the client. But the issue is Javascript not supported in SAP WebdynPro or WebGUI. How to subscribe to visualforce events from canvas events in that ...
1
vote
0answers
189 views

Can Javascript Activity be used to add/update All Subscribers List?

Can Javascript Activity be used to add to the All Subscribers List at the Enterprise Business Unit and update All Subscribers List at the Child Business Unit? I was able to achieve this by creating ...
0
votes
2answers
100 views

Error on when class is called on custom button

I am trying to call my class from a custom button i wrote javascript on the button click but i am getting this error my code on custom button for execution : {!REQUIRESCRIPT("/soap/ajax/15.0/...
2
votes
0answers
976 views

Print Functionality in Salesforce1 Mobile App

I am trying to do the print option in the Salesforce1 Mobile app. I have tried two methods of printing, one is a Javascript method and the other I've tried using is the canvas method. But both methods ...
3
votes
2answers
98 views

How can I make a something like 'Custom Setting' point to an object

I'm finding myself use 'special objects' from time to time (e.g. an account to gather spam contacts), and I find myself wanting to refer to this object in apex code, JavaScript buttons etc. I'd rather ...
3
votes
1answer
285 views

Custom Case Status Publisher

I'm developing a visualforce page exactly same as the standard case status publisher page. My page works OK to publish the case comments and it updates the case status as well. However, I want to see ...
1
vote
2answers
27k views

CSS styling for jquery DataTables - can't seem to make padding go away

I am new to styling and CSS, java, all that.. I've made a jquery datatable and am attempting it to style it to my requirements. There is cell spacing or padding that is not going away no matter what I ...
5
votes
1answer
2k views

How to use the preChatinit method from the Live Agent API?

I am trying to get the details passed from the deployment API into the pre-chat form so that I can store some of them on fields in the record that gets automatically created. The problem is that I don'...
2
votes
1answer
276 views

“onload” like event to indicate SF page is completely loaded/rendered (incl. Related Lists)?

I have a homepage component that removes some links from the Opportunity Line Item related list items on the Opportunity detail page. I'm using the JQuery .ready() function, however this is invoked ...
3
votes
1answer
2k views

JavaScript pop up window (cross-origin frame issue)

I have button on Opportunity on click oh which i am opening a VF page window .After opening the URl becomes https://c.cs16.salesforce.com/apex/VFpage On Click of save button i am closing the opoup ...
4
votes
1answer
189 views

Custom Button not firing apex class

I need some help. I have created the following button , however when i click on the button i get the following . This is the class, which i want the button to call. Anyone have any ideas why this ...
2
votes
1answer
2k views

Custom Button to mass update Opportunity Close Dates

I'm trying out a new Custom Button with javascript for the Opportunity List View page that would extend the close date of any selected records +15 Days. I found code here that I was working to modify ...
1
vote
0answers
498 views

Google Map Issues!

Using VF i am displaying google map based on geolocation field which is a formula field(Lat_Long_Values__c) contain latitude and longitude value. When i run this VF page if there is no value in ...
4
votes
1answer
2k views

How to get the RelatedListId (rlid) of a certain related list in a custom object?

I have a Master-Detail-Relationship between two Custom Objects. In order to make our app "mobile-ready" I need to navigate with the "sforce.one" object in a VF-Page. For this I need the RelatedListId ...
1
vote
2answers
3k views

Update Total with Javascript

I am attempting to update the total of a line item in a pageblock table with javascript and cannot seem to get this to work properly. <script> function calculateTotal(qtyId, salePriceId, ...
1
vote
1answer
7k views

Calling Apex class from Javascript button: how to pass an sObject as a parameter?

I've got an apex class with a webservice method that I'm trying to fire from a custom button on the page layout of the object the method will be doing stuff to. My javascript for the custom button ...
3
votes
0answers
571 views

Trigger a native change event from within a Visualforce component

I am using the following Visualforce multi-select picklist component (thanks @metadaddy!) and extending it to handle an 'onchange' attribute: https://github.com/metadaddy-sfdc/Visualforce-Multiselect-...
1
vote
2answers
627 views

Is there a way to catch/process Visualforce input field validations?

I have javascript/jquery on a page that uses a variable from the controller that is transient. When the visualforce input field validation fails, it refreshes the page without going to the controller ...
2
votes
1answer
2k views

Parsing return from Salesforce's connection.js library

I used this post to create a button which sets a checkbox field on the Case object (see below). I wish to add simple error handling by examining the return value "result". What's a simple way to ...
2
votes
1answer
1k views

Issues with sorting on pageblock table

Hi I recently came across a jQuery animated table sorter plugin from here and I'm trying to leverage it on one of my visualforce pages. It seems straightforward enough but I can't for some reason get ...
3
votes
2answers
615 views

Remote action to display array of images

I using remote action and getting the list image url into visualforce page ie result=[photo1.jpg,photo2.jpg,photo3.jpg] Now i want to display these image with image tag as below mentioned. <div ...
1
vote
0answers
122 views

Populate fields not displayed on page with JS

I've got some script which uses Postcode Anywhere's functionality to retrieve an addresses latitude and longitude and stores them in Lat__c and Long__c custom fields. The fields are not displayed on ...
1
vote
1answer
579 views

Issue with Javascript button updates

I have a few custom buttons that we place on our page layouts that are Javascript buttons. These update a few fields on the record. I successfully created some but I am having an issue with the last ...
4
votes
3answers
7k views

Passing list from Controller to VF page

I'm trying to pass a list from controller to page and use it in Javascript as an array to form html content. But, when I pass a list of objects, an exception is thrown. Uncaught Syntax error : ...