I have an endpoint that takes a long time (about a minute) to give a response. I want to call this endpoint from a Wordpress website while wp_remote_get and wp_remote_retrieve_body are running in the background, but I always get the page loaded only after the request is finished. Is there a way I can add some lazy process so that
Tag: javascript
Plugin Javascript with Source URL’s For Images Using Wrong Directory
This is tough and would really, really love some help. I have a plugin that has a JavaScript file with an array of sources (URL’s) that points to a “texture” directory in the plugin for images, but keep getting 404 errors, because instead of searching images in /website/wp-content/plugins/die/textures it looks for website/textures, or website/post-name/textures and never the plugin. These work
how to decrypt each hash string from a text file using openssl_decrypt and output each line
i have a text.txt file which contains a list of encrypted passwords, each line starts with the name then a seperating symbol and then the encrypted passoword. the list looks like- now i want to decrypt password from each line using the key which is included in the code. to seperate the hash and name i use php explode() function
Add wp_enqueue_script() in functions.php
I’m trying to add Maps JavaScript API in wordpress without plugins. I have seen that to do that I need to use the wp_enqueue_script() function. However, I would like to know what is the correct way to add this function in the functions.php file? Thank’s Answer
Submit and POST “True” or “False” to a series of text questions presented one by one taken from a php array
new to forum, AJAX and JQuery. A little experience of PHP and JS. I’m trying to present a long series of questions (400+) one by one in an input text field on a form with 2 submit buttons labelled “True” and “False”. I need one question to be presented at a time, then record the True or False result as
Cannot send data to database using Ajax and Laravel
I am trying to insert data to database through Ajax And Laravel. But when I click the submit button, nothing happens at all. I tried to see if the javascript is reachable at the first using “Alert” and yes it is. But the part of $ajax is not reachable at all. Here is the code: Html: Javascript: for the controller
Why AJAX dont´t pass value of name from html File-(JS part) to PHP File using POST?
I tried to pass value of name from .js file to PHP using POST method. But when I start the code, there isn´t any alert. In console is only: Uncaught ReferenceError: $ is not defined Do you know what could be improved? Answer As a simple, single page, test script that will send a POST request to the server which
How can I make a browser record the click like Facebook does?
This is my current project. I need to record the current state of an <a> and I get it with PHP, I must be missing something. I have tried to follow the .on() example, but the problem is that when I use it, it is not capturing the click event. Can someone help please? Answer You can get the attribute
How to check if the URL contains any number or empty?
Hi everyone please I need you’re help !! How could I do something like this: I need to know whene my Url index contain something (ID number) or empty. Answer This should get the job done:
how to use google cloud text to speech in the website using client libraries?
I am developing a website where users can input the text and click a button to hear it as audio. I have decided to use google cloud text to speech(TTS) api. All the documentation that I could find online shows how to use google TTS in a local computer by installing the google cloud library. I dont know how to