The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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
179 views

jQuery.ajax call to reset password doesn't work in IE8 but works fine in other browsers

In Visualforce page I have an ajax call to reset user password's $j.ajax({ crossDomain:true, url:"https://test.salesforce.com/secur/forgotpassword.jsp?un=user@myOrg.com", type:"GET" }); ...
2
votes
1answer
5k views

get selected item from selectList and passing to controller

I'm trying to get the value of selected list and passing it to the controller but my code does not work ! I have tried to do this. <apex:selectList value="{!facility}" size="1"> ...
3
votes
3answers
6k views

JavaScript return Invalid Session ID?

Here, here is my JavaScript code within a VisualForce page. The query is guaranteed to return only one result. but I am getting "Invalid Session ID" exception. please help. function ...
0
votes
2answers
5k views

How to Search contacts using wildcard characters(*,%,?) in salesforce

Please give me answer for "How to Search(box) list of contacts using wildcard characters(*,%,?) in salesforce "
7
votes
3answers
2k views

javascript highlighting inside eclipse

I'm trying to find a way to enable javascript syntax highlighting while editing a VF page inside eclipse. Has anyone had success in enabling this?
1
vote
0answers
114 views

cross-site scripting issue in salesforce

I have the following code in my component which uses salesforce highcharts var FILTERS = {!filtersJSON}; function addFilters() { var pickers = []; console.log('FILTERS===> ' + ...
6
votes
1answer
335 views

How can I handle calculations for different countries/locale?

If a user locale is set to ‘nl_NL’, the number format in output text will be 1.777,7 here decimal is not a real decimal.. and I am doing calculation on the above number...so is their standard function ...
13
votes
3answers
2k views

What are the advantages/disadvantages of adding JavaScript libraries as a static resource?

I maintain a product on the AppExchange that currently references both JQuery and custom JavaScript that are included in a static resource. Now that I am making some additional updates to the package, ...
15
votes
1answer
47k views

How to pass javascript value to controller..?

I want to pass the java-script value to controller.I am using repeat on VF page. VF page <apex:repeat value="{!listAdj}" var="Adj" id="hrs"> <td><div class="requiredInput"&...
2
votes
1answer
1k views

JavaScript repeat issue..?

I am disabling one text-field based on if the other has value.I have done that but in repeat Ids are dynamic for each text in different row.I am adding row based on a button click var hiddenRep1 = ...
3
votes
1answer
2k views

Deploy VF with RemoteAction

I have a visualforce page which calls methods tagged with @RemoteAction. The methods are in an extension class which is public, like methods. The class is the extension used in the page. In sandbox ...
2
votes
3answers
2k views

Using Javascript variable values in Apex

I am trying to show territory details and calculate few variables in same page on click of territory in Map. For that, I need to use values which are stored in javascript variable to pass into Apex ...
0
votes
2answers
2k views

Name field cannot be grouped in query call

I have query in visualforce javascript function.It is throwing the following error "Name field cannot be grouped in query call".Can someone point me why it is giving that error.I saw this error in ...
1
vote
1answer
435 views

Javascript Array Multidimensional Error

I am trying to create a multidimensional array from a few lists I have in my VF controller. The Lists are correct, because when I output them just as individual tables, I get all the correct values. I ...
4
votes
1answer
1k views

MALFORMED Query, unexpected token

I have a simple query in my JavaScript within a VisualForce page. and it is giving me MALFormed Query exception, unexpected token: annualVolume. Here is the code: function queryPricingModel() { ...
2
votes
3answers
3k views

get commandlink value using JS

I have a link commandLink with value and onclick attributes, When I click on the link it should call a function in JS to get commandLink value. but it returns undefined in alert. How can I get ...
1
vote
1answer
263 views

Please help me to understand the below javascript code and usage of outputpanel. step by step since i'm new to salesforce

<script> function toggleContacts(className){ elem = document.getElementsByClassName(className)[0]; if(elem.style.display == 'none') elem.style.display = 'block'; else ...
2
votes
1answer
1k views

&nbsp; not working with javascript if condition [closed]

I am having javascript problem in my VF page so I am posting this question here. Here is my code <html> <input id="xyz" value="&nbsp;"/> <script> alert( document....
3
votes
1answer
4k views

How to pop-up alert to a user when he/she navigate away from page without saving the Records in custom visual force page?

Question: How to pop-up alert to a user when he/she navigate away from page without saving the Records in custom visual force page? Details: I have a custom visual force page i.e. "My Members" that ...
5
votes
1answer
1k views

Handling onbeforeunload

I have a VisualForce page that I'd like to do some cleanup if the user navigates off the page without performing certain actions. Notably, if they don't submit the form with either a submit button or ...
2
votes
1answer
3k views

jquery not getting data from outputText field

ok, I have a VF page. and some inputField as well as outputText, and I wanted to do some front end calculation on these data while a button is clicked. on the outputText, for example I have: <apex:...
1
vote
3answers
2k views

Calling Extension Methods from JavaScript

Here's what I want to do. I'm overriding a new/edit button for tasks. when a VF page loads, have it check a condition in my extension. If that condition is met, show a pop-up and re-deirect the user ...
1
vote
2answers
152 views

when i am Double click on URL Error:Survey ID required..How to achieve this?

/*Requirement: I will get a survey mail to my gmail. when i click on that survey link then i will get redirect to a survey page.(This is working fine).Here the questions are in page by page.so fill ...
4
votes
2answers
4k views

How to hide the button when clicking other button using VF page?

We have a requirement where the customer can sign and fill the form and submit.After submitting the form the form will be saved as a attachment and the form will be emailed to the Owner of the Account ...
1
vote
2answers
36k views

Call JavaScript function in VisualForce Page

I want to call a javascript function - makeRowInit() - that arranges some selectCheckBoxes. However, the selectCheckBoxes are not rendered until after an event fires on the page. To call the ...
2
votes
1answer
1k views

how to assign a JavaScript variable to an standard salesforce field to prepopulate it on an Standar Page Layout?

I made a custom button that prepopulates fields to create a new task and works fine. But I want to assing a js variable to an standard field (in this case Name or evt2 field of Task) and it does not ...
1
vote
1answer
1k views

Creating dynamic filter report in salesforce .want to get results in the same page?

<apex:page > <html> <form method="get" action="https://cs6.salesforce.com/00ON0000000FOHS" > <b>Enter Text</b><input type="text" id="pv2" name="pv2"/> ...
2
votes
1answer
4k views

Close the popup window without reload the whole page

I have a pop-up window (div) displayed when I click on outPutLink by calling a javascript function <apex:outputLink value="javascript:pop();" id="pl" disabled="false">pop</apex:outputLink&...
1
vote
1answer
1k views

Getting errors in IE 8 with apex/vf/JavaScript

Setup This is a VF page that is embedded in a STD layout. It's function is to conditionally render, display a warning, and do a redirect. Problem This code works fine in IE 9, FF, and chrome, but ...
7
votes
2answers
5k views

Using jQuery with apex:tabPanel in visualforce

I am using jQuery library in my visual force page, but I've faced a major problem when I tried to use tabs "apex:tabPanel". <script src="{!$Resource.jQuery}"></script> <!-- If I delete ...
2
votes
0answers
598 views

Apex:ActionFunction and getContent

I have a two pages that share the same controller extension. The first page gathers some information for a record, builds a PDF from the second page and attaches it to the case. I have a lot of ...
2
votes
0answers
697 views

Issues for Signature pad in popup Window

I have created a VF Tab in this tab have a custom button "Sign", when i click on the button it will show popup window and I get the signature from customer and save it as an attachment in Account.When ...
2
votes
2answers
3k views

Updating and displaying VisualForce output Label in realtime without refreshing the page

This is what I'm trying to accomplish with my VisualForce Page. I would have three input Text sections on my Visual Force page. User would enter an integer that would be the Discount that would be ...
2
votes
2answers
3k views

Visualforce javascript remoting synchronous

I am using javascript remoting to get data from apex method. My problem is javascript remoting is working Asynchronously.I want to work it as synchronously. Please suggest me.
6
votes
2answers
845 views

Why does apex:sectionHeader not output a JavaScript ID, despite having one available?

Given the following code: <apex:page > <script> function onload() { var elementid = "{!$Component.sectionheader}", outputarea = document....
7
votes
1answer
1k views

Adding rows to apex pageblocktable with javascript

I'm not sure if this is possible but I'd like to know if you can add and remove rows from apex pageblocktables in visualforce using javascript alone. At the moment I just call the controller to ...
1
vote
2answers
1k views

How to render Google visualization Api Table and ImageChart as pdf

I am using Google visualizatio API Table and Imagechart . I want to render it as pdf . Please suggest me. Here is my code:
6
votes
1answer
3k views

Command Button Invoke Action After Async JavaScript

I have a page that prompts the user for information and may need to do multiple web service callouts. Each callout needs to do DML when complete, so I'm using Visualforce Remoting to perform those ...
2
votes
1answer
2k views

Customize Apex Exception Messages from Javascript Buttons

My application has javascript button that call Apex code. Exceptions from web services are sometimes thrown and the user is shown a detailed exception message like this: A problem with the OnClick ...
6
votes
3answers
9k views

Highlighting the selected tab using jQueryUI Tabs

I have a header page with links to all the visualforce page as tabs.I need to highlight the tab on select of it. <apex:page title="{!$Label.site.site_login}" showHeader="false" sidebar="false" ...
3
votes
4answers
4k views

Hide global search

I need to hide global search under Manage Communities --> Edit --> Click on Tabs and Pages -->Select standard salesforce tabs --> select chatter tab..When i did this and when i change from Internal to ...
2
votes
3answers
2k views

How to (cross-domain) access Chatter Profile pics from Javascript code?

I have a JS library in a static resource. This library's code renders a with a Chatter Profile picture taken from the results of a [SELECT FullPhotoUrl FROM User] Or at least tries to. This doesn'...
3
votes
1answer
451 views

Force.com site as javascript script

Is there any way to make a force.com site write JavasScript only? I have the following which ALMOST gets me what I want, but there's I still get the <head> tag as part of the document. Is there ...
0
votes
2answers
990 views

javascript not refreshing tabs in internet explorer

I have an embedded VF page in the salesforce console and am trying to get the page to refresh when a user clicks a button. I have the functionality working in chrome, firefox, etc, but not in IE. Here ...
1
vote
2answers
105 views

Uncaught TypeError: Object #<mp> has no method 'toPOJO' [closed]

Uncaught TypeError: Object # has no method 'toPOJO'
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 ...
0
votes
0answers
755 views

How to disable controlling picklist with java script?

I have an issue with my dependent pick list. my controlling picklist should not be editable but salesforce requires that it should be in the visual force page as an input field together with my ...
4
votes
1answer
822 views

visualforce and inheritance

I have a parent controller class with a string variable called source and two classes, Display and Basket, that inherit from it. Basket is used by a component embedded in the display page. On the ...
5
votes
2answers
1k views

JS not using latest controller variables

I'm using a commandLink which calls a Javascript function as below: <apex:commandlink onClick="downloaditem();" reRender="newItems" rendered="{!cmdrender}"> Download </apex:commandlink&...
0
votes
1answer
784 views

In standard detail page custom button if condition true the button wants to open Jquery popup and condition false the button opens VF page directly

On Standard detail page I have custom button with execute javascript functionality, based on the condition true the button want opens a jQuery popup with another VF page and the condition false the ...