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
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
700 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
846 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
991 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
756 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
824 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 ...
1
vote
0answers
39 views

Getting 'live' controller variable values within Javascript [duplicate]

I'm calling an actionFunction from Javascript to set a controller variable. Even though the variable is being updated within the controller, when I subsequently access it from the same piece of ...
2
votes
1answer
1k views

Update date field on a VF page once value was entered in one of the field

I have created a VF page which looks like the one below. Once a user enter's "Available Start Date", the "Available End Date" field should be populated by that date. Not sure how to do that? Can ...
6
votes
1answer
1k views

Setting controller variables not reliable from apex:commandButton

I'm trying to set a variable inside my controller via an actionFunction, which is called by some Javascript, which is initially called by either by an actionPanel (with styleClass='btn') or a ...
3
votes
0answers
1k views

jQuery Google map page to get current location [closed]

I have a VF page that displays a map based on the coords passed to it from my custom object record, this all works fine. I'm now trying to add it to my SF1 mobile app and use the users current ...
5
votes
1answer
3k views

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

This may not be strictly a VF question, but I thought I would ask all the same. I have a VF component which contains jQuery and some plugins. <c:myComponent jQuery="true" jQueryUI_custom="...
0
votes
1answer
3k views

Display Section on Click of link

On click of case id link ..I want to display section under casecommentsList Outputpanel..But section is not displaying...On click of CaseId..action function(sendRequestId) is called....which in turn ...
2
votes
1answer
3k views

Retrieve Action Function Parameter in Javascript function

I have a visualforce where i am passing (request.Id) case id on click via action function to controller.I am trying to retrive the parameter back in another javascript function on click of Submit ...
3
votes
2answers
928 views

onfocus not working with apex:inputField in chrome

I had created a apex:inputField in my VF page and it was working fine. But when I checked this on chrome today, it didn't work. It is working fine on fire-fox but there seems to be an issue with ...
6
votes
2answers
6k views

Getting value of Inputhidden to Javascript

I have very huge visualforce page.I am trying to access visualforce component in javascript.But I am getting component Id as null.How to access component Id in javascript function createCommentForm()...
5
votes
3answers
2k views

chrome Browser issue when working with javascript

When popup window is closed I received a response from server which i need to pass in my callGetToken function. Everything is working fine in Firefox and IE but the function is not called in Chrome, ...
3
votes
2answers
5k views

pass parameter to controller

<apex:repeat value="{!Requests}" var="request"> <tr> <td>{!request.Subject}</td> <td>{!request.Type}</td> <td>{!request....
10
votes
1answer
61k views

iframe: Protocols, domains, and ports must match error

I have an VF page with an iframe displaying a force.com site from a different SF instance and I'm receiving this error in chrome caused by SfdcCore.js: Blocked a frame with origin "https://<...
1
vote
1answer
313 views

How to break a standard action on a visualforce page? [duplicate]

In my vf page, there is a save button that of standard vf command button. A JS confirm will popup when someone click this button. Now, if user has chosen cancel, I want to cancel the action of save. ...
1
vote
1answer
2k views

Getting Error while submitting approval process through Trigger

I am using custom button to submit for approval process. In the custom button I am validating lot conditions usin gJavascript API, if everything satifies then it will change the Status = Under ...
2
votes
1answer
144 views

Is there simple way to update Billing address with Javascript?

I'm trying to update Billing address with Custom button JavaScript. But I can't update Billing address parts, as it seems there are taken from primary contact. Here is example, what I want to do: {...
3
votes
1answer
6k views

Custom button to visualforce page in new window popup size

Salesforce newbie, so bear with me. I've created a new button and added it to a page. The idea is that it pops up a visualforce page in a new window. This works, however, I don't seem to have a way ...
4
votes
2answers
6k views

Apex REST API call from Javascript via Ajax Toolkit

I have created a GET method REST service and trying to Ajax call the service through sforce.connection.remoteFunction from JavaScript. Able to get the Session Id and it hitting the service. But the ...
2
votes
0answers
317 views

Get Current User Contacts via Ajax Request

Is there a way of fetch a current user's contact information from a canvas app via an ajax (javascript) request? Thanks.
5
votes
2answers
4k views

How to embed standard page in vf page?

My requirement is to embed standard opportunity home page to visual force page, I have tried using iframe but i don't want to show sidebar and header of standard page. For removing the sidebar and ...
0
votes
1answer
301 views

datetime picker value from java script

I am trying to get the date time picker value from java script, but can't get. After I get the value , I need to pass them to another class. <apex:form id="form1"> <apex:pageBlock title="...
2
votes
0answers
272 views

Fetch more and append records using Data Repeater and pagination Site.com

I want to fetch more records and display the previous records along with newly fetched records using pagination. But the default behavior of pagination is to override previous with new one. Is there ...
3
votes
1answer
179 views

What is the best practice to implement custom button?

I planning to use custom button. I can write all the functionality related to button using Javascript API, so that i do not need to write any apex code. Another way is i can write an apex class and ...