Skip to content

Tag: javascript

Search Dropdown Javascript – How to hide list?

I’m a beginner in Javascript/HTML/CSS. So I’m sorry if I’m missing something obvious. My Task: I want to create a search bar on my website (website for images). With this search bar the user should be able to search for “keywords” which I will determine in a list. Every item in m…

Why do I need to call clearTimeout twice to reset setTimeout

I ran into a puzzle as I was trying to make a rotating banner in JavaScript following this tutorial. All the images were displayed at fixed intervals with setTimeout. Later I would like to add a button that allows the user to switch to the next image on the banner manually, so I thought I would use clearTimeo…

How to get the start and last index of a string match

I am trying to get the last and first index of a string match. For example: What I would like to do is get the first index and last index of the match. example I have attempted: wanted output I’m unsure if this is the correct way, it doesnt seem to work for me. Thanks. Answer You are almost there,

Iterate over cells in a CSV file in Node.js

I have a CSV file: “myCSV.csv” with two columns: “first” and “second”. All the data inside is just numbers. So the file looks like this: I would like to iterate over these numbers and perform some custom parsing on them, then store results in an array. How can I achieve a b…

Deep copy object with Depth-First Search

I trying to copy an object. I want to made it with algorithm Depth-First Search. I create a function which will be copy my object without links on old objects. I have a problem, my function doesn’t count the result correctly. Where do i make a mistake? Answer dfs without recursion use additional stack t…

How to send an email through a web page [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 2 years ago. Improve this question I am developing a website and testing it on my local server by Xampp. In my website I want t…

What am doing wrong in here?

Input value always gets into if condition first even am parsing it to parseInt() and when page refreshed with a number it gets into else condition, like its not registering the inputValue at first place, also if i add a submit event rather an click one event doesnt fires up. Answer You’re recording the …