I made a form to select skills. After the 1st selection is made, a 2nd list is shown with options depending of the 1st choice. Then, a “+” button allow to duplicate the fields ans add another skill. My problem : The inital form is OK but when I press “+” the second form created doesn&#…
Tag: html
HTML userMedia facingMode: “environment”doesn’t work on android phone
It keeps using the front facing camera instead of the back camera This is my code: I added the facingMode: {exact:”environment”}, but it doesn’t work Answer Your constraints are not set correctly. facingMode is a member of the video constraint, so it should be Live Fiddle to be ran from a de…
Adding event on “Enter Key” for two filters
I just set up a couple of functions that are executed upon users pressing the “ENTER” keyword. I was wondering if anyone has a more elegant solution or if this would be the only option? I was looking at others’ solutions and I couldn’t find anything else. The reason is that both inputs…
Javascript & HTML – tokens not appearing on connect four board
I’m creating a connect four game using javascript, html, and css, and I’m having trouble with my refreshGrid() function in game.js. Running my html file is currently just an empty board, and this function is supposed to make it so that when the user clicks on an empty space on the board, a chip ap…
How to set html element padding color same as body color
I’ve a fixed element at the bottom of the page that stays on top of every other element. It’s about 33% of the page’s width. As I scroll the page, other elements keep on going behind this element. What I want is a little bit of distance between the top of this element and where the other ele…
Calling javascript from php file failed
I have three different files: index.html, app.js, app.php. On HTML element <a href=”./files/sweetsencrypt.pdf” onclick=”return decrypt(this.href);”>Decrypt Sweets</a> I am calling javascript function in which I am giving ajax call to PHP: Till this everything is okay. When …
Getting the href value of an anchor within an SVG using jQuery
I am using jQuery to target anchor elements within an SVG image I have created to get the value of the href assigned to the anchor element. I am then trying to toggle on and off a piece of content that has an HTML ID identical to the href of the anchor element. I am facing a problem when I
cant get length of m4a audio file on webpage
I am trying to make a nodejs website that will return the length in seconds of any audio file a user chooses. So far I have it working with mp3, wav, and flac files. But it doesn’t work for all .m4a or .aif files The code for my HTML page with javascript is below: I gathered 6 different files for
How to get actual element from document fragment?
I have a template like so: That I convert to document fragment like so: And then I add this element with append: Now the issue is that I need a reference to the appended element, but the reference I have is only a Dogument-Fragment instead of being a HTLMDivElement. How can I get the actual DOM element? Answe…
Fullscreen using HTML5 and JavaScript
I have tried to fullscreen a div using JavaScript. Here is my HTML and JS: var elem = document.getElementById(‘fullscreenThis’); function openFullscreen() { if (elem.requestFullscreen) …