I have XPath, which click the element when the value matches to 1800, but I want this to work only like if the value is greater than 1800, I am noob and I don’t know about that I just googled, Here is working XPath that click on the value 1800, can anyone modify for me, Answer If I understand your
Tag: php
how to pass $(this).data() in ajax request
i need to pass $(this).data into success func in ajax. here is my code But $(this).addClass(‘wishlist-comp-saved’); is not working inside success: function(data) {} Answer $(this) will change context when called. When inside of the success: function (data), $(this) is not the same as it was inside of whatever is calling this $.ajax() request. For your issue, you simply have to
Creating an extension js inclusion problem
I am creating a small plugin with JS animation. In my plugin, I created an index.php file for my shortcode, functions.php to call my JS code and a JS file for the animation. Anyway my shortcode works, but not the animation So I called all these files in my console, it seems to tell me that I don’t have an
Receiving data in php via AJAX (inside WordPress)
I have a php function that needs to receive data via AJAX. This is my code: Javascript php The issue is that the searchstring from the AJAX call is not received inside the php function (the received string is empty). Can anybody help me? Answer well your main problem is that none of the data you are sending via ajax
How to translate button in menu depending on the language of the site – use JS or PHP
https://jsfiddle.net/09fqps3n/ I have WPML translator plugin, it add to domain /language in link (for example domain.com/en, domain.com/ru and so on). I created the menu on the top of my site and it translates my ul-li list. So I want to translate the button “Contact Us”. What is the simpliest way how can i do it use JS or PHP. I
How do I submit two different values with a single button in the form?
I have a form that allows users to change their data (name, surname, display name etc ..). With the “save settings” button, this data is updated correctly. Now I’m trying to include a new field that allows users to upload an avatar. The problem is that now I have another button called “upload” which is meant to upload the image
ajax call to delete a server file returns html of current page
I want to use a click to delete eror_log file on server In the code below why I’m getting html of currently viewing page as a response? This happens regardles error_log exists or not I’m expecting empty string as a response aa.php Answer In the code below why I’m getting html of currently viewing page as a response? Because that
401 race conditions with axios/laravel – CSRF/Unauthenticated
I have a SPA application that is powered via axios. Now, I originally noticed that the CRSF token was being dropped randomly which we identified as a race condition when two requests fired concurrently. I since changed the storage mechanism for sessions to the database and added atomic blocking to my routes and disabled the requirement for CSRF for routes
JS background with Html text
I have found a js background and now I would like to have this background on all my php files. The problem is that html code goes either under js or behind it. How can I solve this? JS file: Another Php file where I included js: Css for Php file: Answer At the moment the cavas which ‘paints’ the
how can send ajax call with looping id number parameter in url
i want send ajax call with loop parameter named [id] in url starts request.php?id=1 ends id=9 and send every call after 3 second . I’m a beginner in the JavaScript, I don’t know where to start the idea, this is my code: Answer First, make the id into a variable let id = 1;. Then you can use the JavaScript