I’m trying to create dynamic columns in my Datatables. Suppose I want to create 4 columns + default column (2 buttons). Well, we would do the following (this works): Now suppose I want to do the SAME thing, but with a single value, something like this: dataHeader contains the following: (Is a copy paste from console.log from my browser because
Tag: jquery
Deleted images still being shown
For some reason, my website still showing images that were already deleted from the specified folder and I have no idea why that’s happening and how to solve that. Process: When the button to delete all admins is pressed, it calls a PHP function that truncate the tables administration, adminimg and login, delete all images from a folder related to
Refresh part of page when user navigated back to it
In my shop page, for each product I have cart quantities that the user can change without add to cart button (it’s with display none and activated by js). my problem is that if a user changed item quantity in single product page and navigated back into shop page it show the wrong quantity from cache. Right now i’m reloadin
how to determine if the ajax response is an array of key value pair or a simple string response
I have a simple ajax function that sends data to the server and prints the response. the problem is some functions from PHP send the response as an array while some functions send the response as a simple string. For example, if the function was a success then the response is received as a key of response and a simple
The second dropdown value for multiple dropdown value NOT SAVE in database using laravel
Hye everyone! First of all, my coding all about dynamic dropdown value, the issues now is the second dropdown value is not save inside the database. Which part did I missed or wrong? View:- View for second dropdown using jquery script:- Controller:- Routes:- Answer The issue is with option value wrongly passed in jquery.It should be data[i].code instead of data[i].id
JQuery with AJAX need to create accordion with multidimensional array
I have an AJAX which returns this array: Array Preview in Console.Log In my HTML I have an accordion: In the AJAX success function, I’m getting the array. I need to append that array in the accordion which should be something like this: In my AJAX success function I can loop through, but I do not know a way how
CRUD table with Ajax + Datatables does not work
I’m creating a CRUD table with Ajax + Datatables, but for any reason, my code does not work. I can get my json response with my data from my database, but I don’t know why, it can’t be printed on my table. Im using 2 files: 1.- main.php: 2.- crud.php: Just to clarify some things … I’m working under a
jQuery find element with class name which is added dynamically
I have a navigation which is listed dynamically with PHP. The html : The highlighted the tags are listed dynamically I have a JS script, when we click on the navbar element then we add .selected class to the tag. When the page is loaded the first tag has .selected class. I need a JS code to find the data-prop
How to loop so I can separate 2 values? [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed last year. Improve this question I’m trying to make an inventory system as part for my e-commerce project so I need to get the price per product. The problem is when
Form post not including the select input
I am trying to make a form to register the number of drinks that are taken from the fridge by a certain person. Currently I have three drinks in my db, meaning that I create 3 select tags and 3 input fields for the number of drinks per drink (e.g. coke, coke zero or coke light). In the code (somewhere