I have two functions displayDataGraph and displayDataTable that displays data as a table and graph. I have a button that toggles between graph and table display.The graph is the default view and the switch to the table view happens with the toggle button. Each page has a previous and next button that takes us…
Tag: javascript
Single-page-application with HTMX, URL browsing history and manual reloading of a page
I have an application with fixed header and footer (it is important that they are not reloaded when we navigate through pages). I use HTMX. The attribute hx-push-url allows to have browsing history through the pages: we can use the “back” and “forward” buttons, and it works as expected…
Antdesign table not rerendering on new column values
I am having trouble rerendering the columns of my table, the library i am using is ant design and I am trying to create a feature where I reorder the column of the table on demand. I have created an example the issue here: https://replit.com/@coupacoupa/Ant-Design-column-reordering In the example, I created a…
Google Tag track popup
I straggle with setting up the google tag for a popup on the website. I follow the guides, but it doesnt work. There is the code from the webpage, what should i take specifically? The webpage where i want to track from –> https://liz.solutions/ I need to track the red button 30 Tage Testversion(30 da…
How can i show/hide navbar based on scroll position?
I am looking for a solution to apply a scroll based animation to my navbar. When i scroll down or up, i want to hide/show the navbar with a scroll animation. After some research i always find only solutions like the following. If you scroll down or up, a css class or a style definition is applied to the navba…
Text converter with javascript split() [closed]
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 8 months ago. Improve this question I have bulk data in written text like this: How to make a tool with javas…
Uncaught TypeError: Cannot read properties of undefined (reading ‘name’) | Material UI
I’m trying to view the fetched data on MUI Autocomplete, but I get this error I don’t why, the stat is fetched from MongoDB and I’m just trying to view the name of the category as an option. The Code: This is how the data is showing in Mongodb Answer So I added this and it worked getOptionLa…
Ray Casting floor with HTML canvas
I am coding a small Javascript/ HTML-canvas Wolfenstein style game. I am following Permadi tutorial. For now I did suceed to implement the textured wall raycasting. What I want to do now is to do the floor raycasting. As far as I understand, when I finish to draw a slice of wall, I have to check if it reaches…
How to use the `PerformanceNavigationTiming` API to get page load time?
I am trying to to use the PerformanceNavigationTiming API to generate a page load metric. The MDN API document linked above says that the PerformanceEntry.duration should give me what I need because it: [r]eturns a timestamp that is the difference between the PerformanceNavigationTiming.loadEventEnd and Perfo…
How do i search by ID in json file? [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 8 months ago. Improve this question so let’s say i have this JSON file: And i need function that searches by ID,(“1…