How to update an element using .textContent
I want to use a script using JavaScript that updates an element in the footer of a website. However, the h3 element isn't getting updated.I have tried textContent not updating HTML, but I wasn't able...
View ArticleReactJS onClick get DIV IDs
I have 3 divs and onClick, I want to grab the ID of each div.(Eventually, I want to add a shuffle function, to shuffle the divs). But for the time being, I just want to get the ID of each. If I...
View ArticleChange css after certain amount of scroll (positioning) but change back if...
I have a full width menu in divi that sits right below the header. The header is set to sticky and shrinks when you scroll. The full width menu below it does not shrink with it. I have tried some...
View ArticleXY Chart dynamically line series using dataSource
I'm using amcharts4 to display some charts using vanilla javascript and a .Net Core API to get the data (on json format).I need to create a Line Chart (XY chart) with a category X axis (time) and a...
View ArticleReplace between two characters
I want to remove a string that is between two characters, let's say for example I want to replace all characters of the string between "value=" and "" with "" so value will always equal...
View ArticleReact/Redux/Firebase createStore Config
When I try to npm start my project I don't see any error on the terminal. I am new to react-redux-firebase. Here is the error that I can see using my browser.Here is the code of index.jsimport React...
View Articletroubles having my datepicker pasing his value
Im learning react native and im trying to pass a date from my datepicker component to a form but im unable to do so, i tried to créate the date picker on the form but since my form its on a hook im not...
View ArticleHow can I use JavaScript to limit a number between a min/max value?
I want to limit a number between two values, I know that in PHP you can do this:$number = min(max(intval($number), 1), 20); // this will make $number 1 if it's lower than 1, and 20 if it's higher than...
View ArticleSpecial characters should not be used continually
I'm creating regex for URL validation. Somehow i have validated Url as i need but my requirement was after the domain name https://asasas.com/ special character should not allow to be continually....
View ArticleConverting relationships between data inside a JavaScript Array
I have got a function that produces an array that is made up of X amount of sub-arrays containing Y amount of objects. Both of these factors are passed to a function to produce an array that looks...
View ArticleScroll locking on bootstrap4 modal when scrolling on content which has...
I have a bootstrap 4 modal with scrollable content. If I'm on the top of the content and I try to scroll downwards (which won't do anything as I'm already on the top of the scrollable content ) and...
View ArticleGet Uptime of Discord.JS bot
I am right now making a Discord bot command for runtime, I was wondering what the most compacted (and still correct) way of doing an runtime to catch how long the bot has actually been online and...
View ArticleHow do I make my shopping cart items still exist even when i refresh the page?
My shopping cart is made in JavaScript. Everything works fine but not when I refresh the page then all I need is a way to make the items to be saved even when I refresh the page and not losing them.Can...
View Articleis there any more parameters that i must add to AJAX function [closed]
I'm using $.ajax to insert data into database. But no data will be inserted and I don't receive any data in success function. Do I have to set more parameters into the success function?That's what I...
View ArticleVue.js single file components WITHOUT a build process
I love vue.js because of its simplicity, which means I can hack a quick one-page SPA with modern, intuitive data-binding syntax and no complex toolchain. I also love the idea of single-file components...
View ArticlelocalStorage to save navbar state
i want to use localStorage to store the sidebar toggle so browser can remember the last toggle. Can someone please take a look at this code please. Thanks in advance. $(document).ready(function() { var...
View ArticleHow to configure websocket?
On the local server, these settings workCHAT_WS_SERVER_HOST = '0.0.0.0' CHAT_WS_SERVER_PORT = 3000 CHAT_WS_SERVER_PROTOCOL = 'ws'And the chat is working fine, but on Heroku there is an...
View ArticleReact component setting state isnt working as expected
React newbie here, can someone please explain to me why this does not work:ProblemWhenever the state is set, it removes the whole component from the page. I have isolated the issue to ensure this is...
View ArticleStopwatch doean't add zero when there is a one-digit number
I would like to make the time display that time 01: 02: 03:43, but I get 0:0:00000000000000001:15 I tired add 0 in dev **0:0:0:0, but it doesn't work. Is it good code for timer? var hour = 0; var min =...
View ArticleHow to add an extra file instead of resetting ReactJS
So I have this code right now: https://pastebin.com/82wxz8yt which allows users to load mp3 files from their computer to a draggable list using input. This created list looks something like this:The...
View Article