In an HTML5 web app, I’m building a feature that relies on client-to-client communication (with pusher). It’s made of PHP on the server-side and Javascript with Vue on the client side. The typical scenario is: a window popup is opened, and from there it communicates directly with some other windows opened into any another browser on the same computer. Let’s
Tag: javascript
XMLHttpRequest Send converted to PHP file_get_contents
So I’m trying to get the send data in an XHR to be put into the header in PHP’s file_get_contents. Because I need the exact Referer header when sending the post request, I need to do it PHP file_get_contents with stream_context_create style. I basically need this: turned into PHP, like this: I do know that the X-Requested-With: XMLHttpRequest part is
Multiple xmlhttprequestes not sending data to back-end
I’m new to xmlhttprequests, so please bear with me. I am trying to make a program that records the users key press and send it to server to save it to a .txt file, but it is not working. The problem is from the JavaScript side it is not sending the data to the server side. Is it not allowed
Trying to learn php with html but I am having trouble submitting a form with a variable that is given by some javascript?
In the Html code below I grab the Ip address of the client and display it to them. I am still learning Javascript however and I am very confused with the line “$(“#gfg”).html(data.ip);” How would you rewrite this line to be more understandable? Additionally within the html file I would like to submit the information contained within gfg to the
Laravel & Livewire: How to execute a javascript function when the component changes?
I’m using Laravel 8 and Livewire. I have an application that shows items objects from a table. When you click on an item, it displays the item details to the right. This works great, since the show() method in the component will do anything it does, binding variables, and such… Now, in the details section, I want to make a
Unicode JSON in Laravel blade for use in React, generating a JSON.parse problem
I have a json object in DB: In the Laravel controller, I send the data to the view: In the Laravel Blade, I attach the data in a div: In React I get the data and save in oldData variable: The problem is that I’m getting a JSON.parse error in React because that JSON print in the Laravel view DOM
can you change the local dexie DB values of null to just a string with no value
so i update my dexie db with my sql db, but the problem is that some of the values are empty THE PROBLEM IS THAT WHEN I WANT TO PRINT THE VALUE IN PHP IT PRINTS ALL THE VALUES AND THE ONES WHICH ARE “”null””…. how do i fix this?? i am using datatables and i have a few columns
unwanted leading space inside data from a table column
a column named story is a text type clicking on a button I have a jquery ajax to get data from that column – on a specific id on server side I have: on client side: everything works problem – there is a leading space before data on both places – bstory and console for example if column content is
Why doesn’t the message POST
When sending data, an empty value comes in Yii2, why is that? Data post: id, name. JS PHP } Code 200, post null Answer By default the Yii reads post params from $_POST global variable. But web server only parses request of body send as application/x-www-form-urlencoded or multipart/form-data. If you send data with Content-Type: application/json they are not parsed into
Search result from other pages
I created a table that displays the values from the my mysql table. Then, using the tutorial, I created pagination system. Top of page: Bottom of page: Then I created a search engine (input) with onkeyup=”myFunction()” and MyFunction looks: My problem appears when I try to search for something – it searches only from 1 page, and from other pages