I am having problems with two functions to encrypt and decrypt text in JavaScript. I am currently using CryptoJS I need to understand how the encryptation works to use it in a bigger project I would really appreciate it your help. Answer You made a few errors in your code: Like @Barmar said encryptar() and de…
Tag: html
How to change nav-link to btn on window resize with jquery?
I want to transform nav bar links from nav-link into btn on window resize. When the windows size >=601 – the nav-item change. But the problem is when the width goes bigger than 600. The nav link is not toggle the nav-link class. I want the nav-item to transform between nav-link and btn on resize. Ple…
How to format JavaScript generated HTML code?
I am trying to make a function which can generate tables from the data passed. The data is supposed to be in this format: Here the entire array is one table, arrays inside it are rows, and objects inside them are data for each cell inside the row. The problem is that when I use this function on this data:
Async elements that act as a form without a submit button
Okay, so this may seem like a lot to ask. I have been pounding my head against the desk trying to figure this out. Take the below example: I am wanting to create basically an asyncronous link between the span with the id of “Number”, and the database. Is it possible to give the user the ability to…
detect outside table row click
How can I detect if a mouse click was not done on a table row? I created this table, which can be modified on the fly and highlights the selected row, if selected. Now I try to establish a function, which removes the row highlighting as soon as a mouse click was not done in one of those table rows.
populate select on page load
I’ve got it working for the first element, but as soon as i try to press another element it repopulates itself and selects the first element. HTML: Population: Necessary Information: I need to add the EventListener to every element of the NodeList as every Element is a select that needs to be populated.…
can’t close message in django
I’m new to Django and I tried to integrate message alerts in my code using a tutorial. These are showed fine but I can’t close them using the ‘x’ button. This is the code for the message section: Answer
Problem viewing a div with a simple function
I have a problem I would say stupid with html and javascript, a simple function that should make me visible and invisible a div crashes the html making it empty! js: before: after: Answer You don’t have to write pre-defined methods. It works same for all other tech stacks such as Mysql, PHP, etc. Recomm…
problem with circular rotating text on browser resize
I have a circle of text that rotates as you scroll down the page which is working absolutely fine. I have set the text to ‘display: hidden’ when the browser width is below 768px, if you decrease the browser width to below 768px it is hidden, then once increased it is visible again, this is working…
Show/hide between two elements randomly onload
I have two elements, .a and .b. By default, both elements have display: none. I want to make one of the two appear randomly when the page loads. Sometimes .a appears, sometimes .b appears, by giving the class .c which will provide display: block. This is what I have tried but failed because sometimes both are…