I have a small slider that switches the preview image to the main image. It works fine now blade.php js But I still have a picture mobile_image, and I want the mobile_image to change instead of main_image at the maximum size of 576px, for this I use <picture> I change my code to like this But my slider just stops
Tag: javascript
Load JSON File and print specific Parts
im building a simple webpage for school. Sadly ive got several problem. Im using an Apache Webserver with XAMPP. I got a JSON-File like: This file is on my Webserver too. I want to load this file especially with XHTML Request and then want to print several parts of this JSON File into HTML/PHP Code. I watched a lot of
The value of my variable is changing In another file
I got this varible: My problem is that the user can change the value in #box. So it contains x different li:s then my var things is not set anymore. How do I change this var? var things is in my index.php file. The place where the user changes the #box is in my change.php file, so I think It’s
Console.log does not show result based on variable value
I’m using Laravel 5.8 and in this project, I wanted to show some results in Javascript based on the variable which is sent to View. So at the Controller, I have added this: Then at the view: So basically, if title does not have any value, it should be showing 1 at the Console bar, otherwise 2 must be appears.
Trailing html with ajax response form php
I am trying to send info to a php file from an html form. The form works just fine and php processes the information correctly but I am having trouble with the response from the callback. Here is the javascript code: Here is the php code: } Everything works fine except for the response from the call back. Here is
Livewire invalid arrow-function arguments on action
I’m testing out Livewire with a Laravel shopping cart plugin. To add items to the cart you call a function, passing in id, name, quantity, price, and an optional array of metadata: The rendered HTML looks perfect, but when I click the button I get: It doesn’t seem to like the => in the array assignment. Does anyone know a
PHP / Javascript AES 128 CFB Encryption / Decryption CryptoJS OpenSSL
Working Decryption in PHP Will output “Decrypted Message” I’m trying to replicate it in Javascript I get an empty response, any help would be appreciated as to where I’ve gone wrong. Thanks Answer CFB is a stream cipher mode, i.e. does not use padding. In a mode with padding, the ciphertext always has a length that corresponds to an integer
How to prevent “my own” javascript code to open a new window?
This one is hard… I have this task to build a module for a big system made with PHP. The most important rule is that I can’t touch the code of the core system, so I can’t fix some of it’s bugs. The main service of my module is to create a custom document that is not edited by the
Change which a-tag is highlighted depending on active page
So I have a menu with different items The class=”active” highlights the menu item, and I was wondering how I could make this class change depending on which page I was on. So if the user visited Archives, then that has class=”active”. The class is just a simple color All my html code is run inside php files. UPDATE Might
is `file_get_contents(“php://input”)` the only way to get post data from `fetch` and is it safe to use async- and hack-wise?
I’m trying to rewrite my JQuery $.post() code via native fetch() function. And it seems like the only way to do it with PHP server code is using file_get_contents(“php://input”). I do it like it is shown here and here: js code: myscript.php: There are two things which makes me worried: The project has more than one fetch call like this.