Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Make your voice heard. Take the 2019 Developer Survey 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.

0
votes
2answers
1k views

How to add the the values in a particluar column under pageblocktable using Javascript?

I have a pageblock table to display the list of accounts and i have few buttons on my VF page like add row,delete etc.User can change the values in the columns and update the records. I want to add ...
1
vote
2answers
805 views

Use static resource in Javascript/Google Maps

Anyone know if its possible to use static resources to store the marker image for a VF/Google maps combo, e.g. loading the icon below. marker = new google.maps.Marker({position: latlng, map: map, ...
2
votes
1answer
1k views

Month validation in javascript

if the month was less than today's month then I should show an error message through javascript in visualforce page.......I have tried but unable to...here is my code /*javascript*/ <script type="...
3
votes
2answers
266 views

Any ideas on creating a custom button for policy acknowledgement?

A URL field will link to externally hosted policy documentation that users must review and acknowledge once per year. The Salesforce.com system needs to track who has acknowledged the policy and ...
4
votes
2answers
244 views

Web2Case & HTML 4 Id & Name compliance

I need to provide a webteam with HTML for a web2case form, the issue is that they are sticklers for compliance and insist that I provide them with HTML4 compliant code. Unfortunately the auto-...
1
vote
2answers
3k views

js remoting 'unable to connect to server' error

I am getting 'unable to connect to server' error when using javascript remoting. vf page : function my_custom_object__c(){ this.name = 'test'; } function save(){ var myCustomObject = new ...
2
votes
2answers
1k views

javascript object creation for js remoting

Hi I am trying to use a RemoteAction function from js remoting.The remote function accepts a custom object,so I need to pass it from javascript.For this I m creating a javascript object with all ...
2
votes
3answers
4k views

How to pass specific value in apex:repeat to a javascript function?

Is there a client-side way of passing a value from within an apex:repeat to a javascript function? Basically, my list is iterated, with each unique itemLat / itemLon, and I'd need to pass the ...
4
votes
3answers
6k 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 : ...
3
votes
2answers
8k views

Passing variables from Controller to Page using @RemoteAction

I'm using @remoteAction in my controller. My question is whether I'll be able to pass the controller variable values from the remote method to the page? I tried using static variables in my ...
0
votes
1answer
2k views

Naviagate to Previous Page or Close the Window

I am creating a Cancel button for force.com site page. This page is a part of a managed package. I am looking for javascript for this button which can work in two different way. It means, if any user ...
5
votes
2answers
2k views

Why is Task ActivityDate (Due Date) different when queried using SOQL?

When I query a Task's ActivityDate in Apex accessed using JavaScript Remoting, I receive a date that is different from the date displayed in the Salesforce interface. The query below (with a generic ...
4
votes
4answers
1k views

How can I use 'query more' using javascript remoting?

I have an object with 50000 records in it, which I need to retrieve in chunks of 100 records per call/chunk. I tried using OFFSET, but this way you can not call more than 2000 records. Is there an ...
2
votes
3answers
2k views

Is it possible to add the mini page layout popup to a list column?

When you hover over a recent item in your salesforce sidebar it pops out a box that shows you a few details from the record as defined in the mini page layout for that object. I would like to ...
4
votes
2answers
4k views

How to pass variables from Iframe to VF page URL? I'm displaying a vfpage in sidebar as homepage component

I have a visualforce page and a controller for it, already written. My requirement is to show the same page as one of the homepage components in the left sidebar, I did that by calling through an ...
5
votes
1answer
1k views

How do I line up many Multi-select picklist inputFields on a Visualforce page?

I have 5 different Multi-select picklist fields on an Object. In my Visualforce page I use an <apex:inputField> display them on the page. Visualforce renders two side by side Multi-selects ...
3
votes
3answers
3k views

JavaScript Remoting on Standard Page Layout

I have a couple of JavaScript remoting functions used to count records and to display that count to the end user. The JavaScript remoting functions are on a Visualforce page, and the Visualforce page ...
2
votes
2answers
2k views

Custom button to delete some tasks

I'm trying to create a custom button which deletes a list of Tasks, depending on certain criteria. Here's my custom button code: {!REQUIRESCRIPT("/soap/ajax/10.0/connection.js")} {!REQUIRESCRIPT("/...
14
votes
3answers
8k views

How can I get this apex:repeat variable in javascript?

I have a list of Strings which can be selected or not. When the user clicks save, I need to check which Strings are selected or not from within Javascript. I made an inner class to set a selected ...
5
votes
2answers
917 views

Building HTML with JavaScript remoting

I wrote a little @RemoteAction method that returns a string. And the string is nothing but an HTML snippet that I want inserted on my page. Callback method on the page receives the result and uses ...
11
votes
4answers
16k views

Call javascript function from your apex method

The basic need for me is to find distance between 2 accounts. I have the lat and long of addresses in accounts stored in as custom fields in Account object. In My VF page i have 2 lookups to choose ...
3
votes
2answers
946 views

Javascript redirect with Google Analytics cross-domain link

I have a visualforce site, running the Google Analytics asynchronous tracker. So that a customer can log in, we have a redirect from the unsecure, branded site (www.something.com) to the company....
0
votes
1answer
2k views

How to include data from custom Lookup Relationships in a Visualforce page

I have a custom object: License, this has a Lookup for the standard Account (meaning: an account can have many licenses) and they are shwon on the account page with a related list. On my account page,...
3
votes
4answers
4k views

How to compare 2 dates in JavaScript on a Visualforce page?

I have a Visualforce page in which I try to compare 2 dates. The code: <apex:page StandardController="Account"> <script> window.document.onload = new function(e) { alert("{!Account....
23
votes
6answers
25k views

How can I execute JavaScript on a SFDC Standard Detail Page?

*NOTE: This is not feasible as of the latest SFDC Releases. * I have a requirement to execute some JavaScript on a SFDC Standard Detail page. Specifically we would like to remove the ability for ...
4
votes
2answers
528 views

Salesforce Standard JavaScript

There are some JavaScript functions used by the standard Salesforce pages that would be useful outside of the Standard pages. For example, the Account page has a "Copy Billing Address to Shipping ...
10
votes
3answers
3k views

Sites login method using javascript remoting

I'm looking for a way to access the site.login() method using javascript remoting for a mobile/html5 site. The method returns a pageReference in theory, but I'm only getting back a null object. ...