I’m trying to add to my webpage an option to share image and video using Web Share API. When testing it, I’m having the following problem: on Android + Chrome, it works sharing video and images, but when I execute the same code on iOS 14.4 Safari (running on iPhone 6s) I only get the text and URL …
Tag: html
Javascript won’t work properly with my form
So I am currently doing a project for our class, in which I have to display something that I previously stored in a database on a separate page. I chose to display every dataset, as it is the easiest to do. With PHP I implemented a foreach loop which is supposed to show each dataset with a button “EDIT&…
Is is possible to create a webpage with pagination but no database?
I’m building a website using vanilla HTML, CSS, and JavaScript. It’s a shared hosting and I only have access to the FTP, so there is no database. I don’t need the database to be honest. However I want to create a page that display some movie covers and I would like to sort by date and alphab…
JQuery Search function for div containers
I am trying to use JQuery and this script (to filter my mySql output): the mySql entries I want to filter look like this in html: so each <div class=”card” id=”notes”> is one entry. The problem is (as you can see) I probally use this function wrong because I filter $(“#note…
My replace function works with array but not with HTML collection which is also an array. Why?
I am writting a function to replace the position of some HTML elements in the page. Should be simple and it goes like this : It works with testArray but it doesn’t seem to have any effect on the HTML elements order. Why and what can I do to change the original DOM? Answer You need to clear the element&#…
Setting variable to target all divs with same Class
When selecting a class with querySelectorAll i get an uncaught error Uncaught TypeError: b.getBoundingClientRect is not a function at overlaps is there a way to fix that? I have div being generated with an ID ‘enemy’ and want to detect overlapping with my div ID “char”, but the functio…
Invoking JS Interop Function for DOM element located in submenu in Blazor
I am trying to invoke a JS function that creates a modal on user click through JS Interop in Blazor. The thing is, the function is using a onclick event for a DOM element that is inside a Blazor submenu. When that DOM Element is outside the submenu in the side navbar, it works fine. When I put that element
Converting a complex timestamp to normal time in angular
I have a time stamp like 2021-03-12T14:55:35.454Z I want to convert that into normal time like this (below) in the ts file 2:55pm I am working in angular. Please help if you guys know. I have tried searching other stackoverflow questions but I couldn’t find the exact solution Please help if you guys kno…
JavaScript Onkeyup expiry date
How can i set onkeyup to output this format 00/00 instead 00/00/0000 Answer You could add maxlength=”5″ I also improved your regex to use replace and remove the / automatically
Simple accordion doesn’t work because handler fires 2 times at once
I’m trying to create a very simple accordion. index.html main.js The first accordion works without any issue but when clicked one the second on the “toggle” function gets fired twice instantly making no difference. Any clue ? Answer First, you don’t need to write a toggle function for …