Questions tagged [jquery]

jQuery is an open-source multi-browser JavaScript library designed to simplify the client-side scripting of HTML. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.

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

window.onbeforeunload not working when using in Salesforce lightning

window.onbeforeunload function is not working for me in the salesforce lightning environment. I have a visualforce page styled using Lightning design system, we I view the page in classic the window....
0
votes
0answers
703 views

jsPdf not working in Visualforce page for large documents

Task: To convert a document[visualforce generated one] into pdf. Solution I am using now : making use of salesforce renderAs="pdf" method Problem Faced : RenderAs pdf method is not working as ...
0
votes
0answers
826 views

Cannot adjust height of iframe

I am trying to adjust the height of an iframe to 200px via Jquery. However I'm not able to do so. Below is my code $(function(){ alert('Hi'); $('iframe[title=TestPageResult]').css("height", 200); })...
0
votes
1answer
1k views

Window.onload function disables inline edit capabilities on custom vf page

I have a visualforce page which is editable via the inline edit functionality provided by salesforce, or by clicking edit and being taken to a standard-ish edit page. I also have a popup that gets ...
3
votes
2answers
437 views

$(this) equivalent in lightning

As we all know, a lot of jQuery codes don't work on lightning (or I might be doing something wrong). Anyway, I'd like to ask how I could target the source of the element, similar to $(this) in jQuery. ...
2
votes
1answer
303 views

jQuery issue with Locker service in Summer 17 release in Microsoft Edge

I have lightning component and it uses jQuery to do DOM manipulation. I manage to get it working in chrome and firefox with jQuery 2.2.2,2.2.4 and 3.2.1. But MS Edge is throwing error . I have ...
0
votes
0answers
292 views

SLDS - Cannot add class for toast notification theme

I have a toast notification and I'd like to add slds-theme--success and slds-theme--error to them based on success or failure of data entry. The adding and removing classes in JQuery are not working. ...
1
vote
2answers
2k views

How to capture "Enter" keyboard event on dynamically created lightning:input component

Official docs for lightning:input did not show any keyboard event attributes yet. I have a dynamically created input form and I want to call a controller's method after hitting the enter key on a ...
6
votes
1answer
634 views

jquery version 2.2.4 with lightning component version 40

Before summer 17, the jquery version 2.2.4 was working well with locker service. Now, with summer 17, we have locker service enabled automatically. With this, if we update our components to version 40,...
6
votes
1answer
865 views

jQueryUi input[inputIndex].hasOwnProperty is not a function

I'm trying to use jQueryUi V1.11.4 is a Salesforce Summer 17' Sandbox and I get this error : Uncaught TypeError: input[inputIndex].hasOwnProperty is not a function throws at /resource/1498467744000/...
1
vote
0answers
163 views

JQuery Auto Complete AJAX Call URL parameter alternate

I am implementing a jquery auto complete search box. Am having JSON file in static resource and referencing it in ajax URL parameter. It is working perfectly. But now I want to make the JSON values ...
0
votes
3answers
5k views

jQuery .click(function(e){} not working on lightning component

I am new on Salesforce/Lightning and I'm trying to implement this OrgChart library in a lightning component. The nodes (html) are created dynamically from the javascript library, the methods are ...
2
votes
1answer
583 views

Salesforce Lightning make checkbox checked using jQuery

I am wanting to iterate over two arrays, and I want to set checkboxes to checked whenever items in the array match. I have no problem with the iteration, and I can change the checkbox with the name ...
0
votes
1answer
818 views

How to check all checkbox [duplicate]

I am trying to check all checkbox but its not working. <head> <apex:includeScript value="//code.jquery.com/jquery-3.2.1.min.js" /> <apex:includeScript value="//ajax.googleapis.com/...
0
votes
1answer
109 views

Jquery plugin not getting applied

I have added the plugin for html table to sort,paginate and search. I had 5 tables in a page. The plugin is not getting applied to the following table alone.What could be the issue here? For clear ...
1
vote
1answer
1k views

Create JSON from Picklist Entries with both Controller and Dependent Picklist

Am having JQuery auto complete search box in visualforce page. Currently the input for this search box is(ajax data) JSON. Which is a static resource file. But If client add one more option in the ...
3
votes
3answers
20k views

How to pass row index in javascript controller in lightning?

I have a requirement where I am creating table row dynamically. I have to call javascript controller method from dynamically created ui:inputText using change="{!c.calculateCostAndPrice}" attribute. I ...
0
votes
1answer
416 views

How we can only allow spinner to run when all validation passes in VF and JQuery? [closed]

I am new to VF and JQuery. I have developed some validation code using VF and javascript and also have a spinner in place. When I click on Save button all validations are executing and spinner keep ...
0
votes
1answer
876 views

How to use apex ids within jquery functions

I want to fade out my apex:pagemessage when I click anywhere on the window. For that jquery gives a simple way : $(window).click(function(){$("#id").fadeOut();}); But here I am not able to use the &...
0
votes
1answer
108 views

using jquery to pass value to constructor on rendered attribute

I am trying to populate a field in my vf page based on id stored in an hidden input field. I tried using the onchange attribute for inputText but it didn't work. I am now trying to use jquery to ...
0
votes
1answer
365 views

visualforce jquery validation example, does not show calendar popup why?

I have developed the below code using Visualforce page and javaScript + CSS. When I click on "Closed Date", I don't see that date calendar is coming up. Could you please let me know what could be the ...
0
votes
1answer
69 views

Javascript function not displaying correct result

<apex:page standardcontroller="Price_Study__c" extensions="dynamicpicklist" sidebar="false" > <apex:includeScript value="{!URLFOR($Resource.JqueryA, 'js/jquery-1.6.2.min.js')}" /> <apex:...
0
votes
1answer
213 views

Auto insert text at end of line of a rich text field

Here is the requirement: I have a Visualforce page with inputfield which is a rich text field. I want to insert a timestamp value where ever the cursor is present. I have a code that runs perfectly ...
0
votes
1answer
520 views

Add commas while user typing numbers on Visualforce page

I have a On VF page input field called Amount. If user typing 99999 then it must return 99,999 how do I achieve this. Any help!!!
0
votes
2answers
1k views

Uncaught ReferenceError: jQuery

I have referenced Jquery in my visualforce page and i'm getting the following error: Here is my visualforce page: <script src="https://code.jquery.com/jquery-1.10.1.min.js" type="text/...
0
votes
0answers
564 views

How to attach multiple files in a visualforce page like as in gmail

Attach file button should have the capability adding multiple files at a time and deleting one among the uploaded files. Just like we have this in gmail. Right now, I have ability to upload a single ...
1
vote
0answers
152 views

Auto complete field selected value not getting passed to controller class

JQuery helps good to select a value from auto complete field but it is not passed to the controller. So, my search result query is not getting modified properly as desired. I can't get where I do any ...
1
vote
2answers
2k views

how to clear value in vf as well as in apex controller?

after clicking clear button i want to clear the input text value.Now it's clearing fine.But the value remains same in the controller.It is not reflected in the apex. how to do this ? vf: <...
0
votes
2answers
2k views

disable checkbox and enable checkbox [closed]

I have this checkbox. What I want is that when I click New it would disable the Old checkbox and vice versa. By the way, this is a repeated checkbox, then when I click the Submit Button, it will ...
1
vote
1answer
427 views

jQuery on Visualforce to show/hide table rows dependent on parameter

I want to integrate jquery to show/hide table rows dependent on a parameter: The jQuery looks like this: <apex:includeScript value="{!URLFOR($Resource.input_js, 'input_js/jquery-3.1.0.min.js')}" /...
6
votes
2answers
985 views

Locker Service and Fullcalendar.io

I have seen that there have already been some questions regarding the open source Fullcalendar.io and the various libraries associated with it, and the strict requirements of Locker Service, but I was ...
0
votes
2answers
1k views

how to hide and show the pageblock using jquery in vf page

I have a visualforce page.based on command link click i want to disaply different pageblock.I want to achieve this using jquery. Please guide me vf: <apex:page standardController="Contact" ...
2
votes
1answer
221 views

How to toggle two commandlink without refresh the whole page

I am having a pageblock in which pageblock sectionitems of 2 commandlinks. I want to toggle between the these two links without getting the page refreshed. VF Page: $(document).ready(function(){ ...
0
votes
2answers
5k views

email and phone validation on visualforce page

I have the below form and I would like to show error message on the form. so the users cannot save with proper email and phone# format. Here is my vf : <apex:page controller="Survey" sidebar="...
1
vote
1answer
245 views

jQuery Tabelize is not working when Locker Services is activated

I am having an issue with using jQuery Tabelize when Locker Services are activated.When Locker services are deactivated code just works fine. I have created sample code to reproduce the error. ...
3
votes
1answer
6k views

Failed to load resource: the server responded with a status of 404 (Not Found)

Datatables is working for internal salesforce users where as same page with datatables is not working for customer communities users. Failed to load resource: the server responded with a status of ...
8
votes
2answers
2k views

$A.enqueueAction is hit, but not executed until another event fires in page (SweetAlerts)

Im trying to use SweetAlerts to confirm the deletion of a record. https://limonte.github.io/sweetalert2/ Im extremely green when it comes to javascript/jquery. Everything works fine without the Alert....
0
votes
1answer
217 views

Page scroll bottom when user try input anything: Safari issue

I am facing exactly this issue only difference is my scrolls down not top. I try the workaround but can't get what changes I need to do. Can someone please guide me? https://success.salesforce.com/...
2
votes
1answer
758 views

Lightning Component Dynamic DOM jQuery Binding after LockerService

I have a function that runs after my scripts finish loading that will perform several callouts and makes logic decisions to create a html string representing DOM elements (Essentially building a ...
1
vote
0answers
526 views

Same origin policy blocks AJAX token call

I need to implement a feed from a client site into their Salesforce system. I'm using the REST API. I can get an authorization code, but when I try passing it to get an access token using AJAX, it ...
0
votes
1answer
286 views

How can i make below javascript code synchronous?

Below is the scenario - $('#registerUser').on('click', function() { uploadFile(); var registrationInfo = { "email" : $('#...
1
vote
0answers
93 views

Lightning component loses event bindings

I've got a custom Lightning component that works well. However, as soon as I detach it from the DOM, and put it somewhere else (with jQuery e.g. to ease UI development), it loses most of its event ...
1
vote
0answers
196 views

Display pop-up in onClick

I have matrix, if criteria matches from x-axis and y-axis the value for particular cell increases. Now I want to show pop-up if I click on the cell. Pop-up will contain the link for the records from ...
0
votes
2answers
1k views

Visualforce page with Full Calendar Events not populating

I am looking at setting up a custom calendar using Full Calendar (https://fullcalendar.io/ ) and am following the guide here: https://salesforceprojects.quora.com/Implement-full-calendar-drag-and-drop-...
0
votes
1answer
817 views

Pagination with Jquery not working [closed]

Following is my code where in i wanted to do pagination for Datatable. <apex:page id="page" standardController="Error_Log__c" extensions="errorLogController_Check_MDSR" sidebar="false" showHeader=...
0
votes
1answer
3k views

Access Apex:SelectList values from JQuery

I'm having following code to access the selected values of a picklist. But i'm getting 'undefined' as the value whenever i read from JS. Here is the code <div class="slds-form-element__row"> ...
2
votes
1answer
838 views

Select only one radio button from muliple radio buttons

I have converted two picklists into radio buttons. I want to select only one radio button from two radio button groups. I also write jquery for this two group but it's not working. please help me out. ...
1
vote
2answers
646 views

what is the wrong in my code it showing error " Invalid left-hand side in assignment "?

it is showing error Invalid left-hand side in assignment? what is wrong in this code can any once help ?
2
votes
1answer
1k views

set Focus on Visualforce Page

I am trying different code suggestions to change the focus to another field instead of text field using jQuery: j$('.elementId').focus(); and changing the focus on load: <script>function ...
0
votes
2answers
204 views

Facing an issue with jquery autocomplete functionality

I have a visualforce page, in which autocomplete functionality implemented for a field using Jquery. While displaying the results in the suggestions, I would like to filter the record based on a check ...

1 2 3
4
5
15