Skip to content

Tag: html

Duplicate fields in a form upon selection

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&#…

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…

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 …

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…