Questions tagged [jquery]
jQuery is a JavaScript library. jQuery is a popular cross-browser JavaScript library that facilitates Document Object Model (DOM) traversal, event handling, animations, and AJAX interactions by minimizing the discrepancies across browsers. A question tagged jQuery should be related to jQuery, so jQuery should be used by the code in question, and at least jQuery usage-related elements must be in the question. Consider also adding the JavaScript tag.
jquery
1,038,080
questions
1
vote
1
answer
33
views
ScrollY issue in Datatable
I am using Datatable to give style to my table in HTML and I had to enable the ScrollY.
Although It worked, it has a style problem that I am trying to solve.
When you resize the window, for some ...
0
votes
1
answer
20
views
Jquery ajax await return more XHR + value
Jquery version: 3.6.2
When writing an ajax request I want to avoid callback functions like .done() due to readability. I wish to only use var result = await $.ajax({}); . Creating a complete promise ...
0
votes
0
answers
40
views
Show N/A for all the null columns in laravel yajra datatable?
I want to show default value like
"N/A" or dash "-" if the column value is null. Currently it displays empty column as below:
I dont want to add default value for each column ...
0
votes
0
answers
35
views
Ajax Response Html with html download links not working and other issue
I'm absolutely not expert on js and html, following the answers and samples of stackoverflow I found a way to publish on my website a external html source. In the external source there are present ...
-1
votes
0
answers
15
views
Close the select2 dropdown only when clicking on a specific button [duplicate]
I am using the Select2 jQuery plugin to create a dropdown. I have multiple dropdowns on my page.
I want the dropdown to close only when licking on 'Apply', 'Cancel' or 'Reset' buttons. I don't want ...
0
votes
1
answer
65
views
Add additional field issue
I'm working on this page where I have some custom JS/jQuery to add a search feature for a list. I need to be able to "add" a field if required. I had it working before implementing the ...
0
votes
0
answers
25
views
Rails UJS Remote Form Only Evaluates JS for 2XX Responses but Not 4XX Responses
Was there a change in how JQuery 3 and Jquery 1 handled remote form errors on Rails?
In the past, (Rails 6, Zurb Foundation, Jquery 1), the code below would work. A user would submit a form, they'd ...
0
votes
0
answers
24
views
Click to activate only working in half the window
I'm trying out Trumbowyg, and while it's working very well, there's an issue when it comes to clicking inside it to 'activate' it (i.e. show the cursor) to be able to start typing.
It only activates ...
0
votes
0
answers
51
views
WordPress AJAX POST Request Not Working: Page Refreshes Instead of Displaying Result in Modal
I've created an AJAX function in WordPress to send a POST request and display the result in a modal upon successful completion, without refreshing the page. However, the AJAX code isn't working. When ...
0
votes
0
answers
21
views
How can I fixColumn and adjust the content of fixedColumn columns?
Currently I am using a 3rd party datatable library.
Here is my configuration when re-rendering the mesh to start loading the input data.
_columns: is the list of columns I declared earlier
Code:
tbl....
0
votes
0
answers
16
views
How to Validate Select box through Jquery Validator [duplicate]
I have to validate select box through jquery validator.
<label class="form-label" for="inputState">Status</label>
<select id="inputState" name="status&...
0
votes
0
answers
20
views
Toggle b/w two jquery datatables
I am new to jquery and want to implement jquery datatables for my project.
$(document).ready(function () {
function destroyDataTable(table) {
if ($.fn.DataTable.isDataTable(table)...
0
votes
1
answer
61
views
FileContentResult return - 2 different controller methods, different result
I am using ASP.NET Core and ClosedXML to generate an Excel export.
Export Method 1
Here is the controller method that DOES return an .xlsx file to the browser. The method gets called from a .cshtml ...
0
votes
0
answers
22
views
Server Side DataTables warning: table id=DataTables_Table_0 - Ajax error
I'm getting an error when trying to setup a datatables with my project.
DataTables warning: table id=DataTables_Table_0 - Invalid JSON response. For more information about this error, please see http:/...
-3
votes
1
answer
42
views
Best Way To Scrape/Extract Data From Wesbite - Find url via Chrome Network tools?
Below is the link to a webpage and a screenshot of the network tools that shows what occurs when clicking download csv -- what is the best way to write a script in python to return the data that shows ...
0
votes
1
answer
31
views
How To Cancel / Delete a Function (when changing screen size) - Jquery
How do you cancel / delete a function, dependant on the screen size?
Currently, my functions carry over from portrait to landscape (and vice versa)
.
So is it possible to delete/cancel a function? And ...
0
votes
1
answer
20
views
Can't get data with URL in Postman, but can with passing by key-value
I'm not very familiar with Postman but why GET request returns data when checkbox is marked and without url parameter, like this:
and when I try to put url parameter and unmark checkbox, then doesn't ...
0
votes
1
answer
30
views
BlockUI not defined error issue with ajax
I'm trying to implement blockUI and unBlockUI to update my page accordingly. Almost randomly, it will work without flaw and randomly spit out blockUI not defined in the console. The code works with a ...
0
votes
0
answers
27
views
File upload results in an error - net::ERR_FAILED while uploading word file
This is my code:
var formData = new FormData();
var f = $("#myFile")[0].files[0];
var form = $('#__AjaxAntiForgeryForm');
var token = $('input[name="__RequestVerificationToken"]', ...
-1
votes
0
answers
14
views
Cors issue with ajax call [duplicate]
How to resolve cors issue with below code. tried all the methods.
any help would be appreciated.
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/...
0
votes
0
answers
12
views
edit key clones with each click on the input filter
Hi all I have a problem with the table generated with datatable. I created this example table where I would like to have 3 things:
search for each column
generic search in the top right corner
...
-1
votes
1
answer
52
views
jQuery Ajax call returns the whole php file raw code
Now I am asking this question after a huge efforts searching for the solution, I know that are a lot of questions that are the same but none of them worked for me, I have three main files, index.html ,...
-1
votes
0
answers
50
views
Reload after click on button again in JQUERY
this is my script in JQUERY step
onStepChanged: function (event, currentIndex, priorIndex) {
if (currentIndex === 3) {
$.ajax({
url: '/UserPanel/Home/...
1
vote
1
answer
50
views
jQuery index returns -1 when dragging multiple items
I have two tables and I am able to drag and drop multiple elements using sortable. My problem is that when I drag items from table2 sometimes in table1, ui.item.index() returns -1.
After some tests I ...
0
votes
1
answer
45
views
select2 date custom option is not opening if clicked again
$(document).ready(function() {
///dateee picker
$("#date-range-options").select2({
placeholder: "Select",
minimumResultsForSearch: -1,
closeOnSelect: false,
allowClear: false
})...
1
vote
1
answer
59
views
Button with slider confirmation
I need to have slider confirmation button which will look like below
Initially look of the button will be:
After user completes the slide it must look like:
I currently have the code below. How to ...
2
votes
1
answer
42
views
Ajax call is not taking full path without including Project Name
My project is running on an IP where there are other projects too. If I add the full URL in my ajax call then it works fine. Like:-
$.ajax({
headers: {
'X-...
-1
votes
1
answer
37
views
How do I style a form select field, depending on selection with css or jquery? [duplicate]
I want to style the text color in the select field as gray (#b8b8b8), and when a selection (either Yes or NO) is made, the select field text should be styled as white (#fff).
<form>
<select&...
-1
votes
0
answers
36
views
There is a strange error while using the fullpage script wheel event
There is a strange error while using the fullpage script wheel event.
When using the wheel event in the source, when section3 and section4 are reached, there is a problem that the contents shown in ...
0
votes
1
answer
50
views
Append cloned row to latest child where the button is clicked
I have a table with a button that when clicked, I save it in the DB via AJAX. If successful, it should clone the current row where the button is in, and then append it to the latest child. Saving it ...
0
votes
0
answers
31
views
how can load the dynamic form after one click again in JQUERY? [duplicate]
this is my script to load a partial form for adding new address:
function handleLocationChange() {
var selectedLocationId = $(this).val();
var subLocationSelect = $(this).closest("form&...
0
votes
1
answer
55
views
jQuery ajax issue with multiple forms on same page - always picks first form
I've been struggling with this (most likely simple) issue for a few days. Any help would be appreciated.
I have a page with multiple form buttons on it for people to sign up for events. The list of ...
0
votes
0
answers
48
views
Laravel jQuery AJAX call results in error status 403 SOMETIMES
I'm making a query to a web service using jQuery AJAX. In my local environment, it works well, but in production, env has that error.
The function it does is simply to update an order. The error is ...
0
votes
1
answer
36
views
Custom function to check blank inputs
Trying to build a custom function that checks for errors and then shows the error.
As of right now, the whole process looks like this:
$("#addRecordSubmit").on("click", function(e) ...
-1
votes
1
answer
67
views
How to detect whether user has clicked on “open link on new window” in jQuery
Irrespective of the browser or HTML tag, if a user clicks on “open link in new window” then the user should get redirected to the login page.
I've tried window.opener, but it is not working.
In my ...
0
votes
1
answer
27
views
RowCallBack function for Jquery datatable coloring text and background with ajax returned value from mysql
Need some light on this issue in the attached screenshot. If I entered fixed color value (ie #ffffff for both font and row background) it worked nicely.
However, I want to use the value returned from ...
0
votes
1
answer
35
views
Jquery: replace text but skip html tag
I need to replace just the text 'Yes, I want to receive News, Discounts and Promotions' to my custom text.
From this:
<p id="woo_ml_subscribe_field">
<label class="...
-1
votes
1
answer
57
views
Remove all rows of table using jQuery
I have a javascript function that insert new rows in Table using jquery. This is the code:
$.each(data,function(i,item){
$('#tb-articoli').dataTable().fnAddData( [
...
-3
votes
3
answers
97
views
How to make bootstrap datepicker be always visible/open? [closed]
Explaination
I am successfully using an 'input type=date' as a datepicker in bootstrap 5.3, to select the date for data viewing.
The problem that i have is: i have to click on it to be visible.
For my ...
0
votes
1
answer
19
views
How to Redirect Based on Form Input and Record Lead in Unbounce
I'm working on an Unbounce landing page and need some help with a form submission script. The goal is to redirect the user to a specific URL based on their input for the company_size field and ensure ...
0
votes
0
answers
39
views
How can update the step form view with Ajax in ASP.NET
this is my method to Get Cart:
[HttpGet("/UserPanel/CheckOut")]
public async Task<IActionResult> CheckOut()
{
var text = await _siteService.GetSiteSettingForEdit();
...
0
votes
1
answer
39
views
Store result of json request in a variable [duplicate]
I need to store a value of json response to use in another function.
I have this code:
const url_moodle = "https://xxxxx/xxxxx/app/appmoodlejson.php";
var moodleEmail = function (email){
$...
0
votes
1
answer
22
views
Telerik kendo ui jquery grid
In the latest release of Telerik Kendo UI for jquery it has been written about the possibility to re-render particular row when using the grid widget. I know that when googling it is possible to find ...
0
votes
0
answers
17
views
Jquery Multi-select ComboTree plugin: how to insert selected count label
I'm using the Jquery Multi-select comboTree plugin and i would like to insert a selected elements count label inside combobox, but i'm not find a correct way to do this. I'm follow up the plugin ...
0
votes
0
answers
37
views
How To Disable Scroll During a Loading Animation?
I’m currently developing my company’s website and I’ve been following a tutorial to implement a loading animation. However, I’m facing an issue with disabling scrolling during the animation. I’ve ...
-1
votes
2
answers
72
views
Clicking on jQuery
When I define a code to click and change that element again, I want the element to return to the first state with another click
I wrote another click but it didn't work
The toggle didn't work properly ...
1
vote
1
answer
39
views
How to prevent a clear data upon clicking new add address using button in ASP.Net Core
@model Registration
@{
ViewData["Title"] = "Register Page - Step Two";
}
<button type="button" class="btn btn-primary" onclick="addAddress()"&...
0
votes
0
answers
32
views
Can somebody help me out for the following multiple drop-down binding problem?
I want to bind the second drop-down based on first drop-down's selected option.
Also when add second dropdown first selected system should be disabled.
Html for drop-down is as below:
<div ...
0
votes
0
answers
18
views
WooCommerce custom add to cart with quantity buttons [duplicate]
I need to set up a custom add to cart button with the product ID added.
This is the code I have and it works perfectly.
function custom_add_to_cart_button_with_quantity_shortcode($atts) {
$...
-1
votes
1
answer
75
views
Sortable multiple selected items
I have two tables and I want to be able to drag and drop several items at once. The user selects the items through checbox and then can drag and drop them into the same or another table.
I know it is ...