I am trying to have the text between the two images come to the front and not separate the images. The images should come together with a square-negative in-between and within this square the text should be, centered horizontally and vertically I have tried position: relative, absolute. I have tried separatin…
Regex expression to match certain url behavior in my website
I have the following url I’ve trying to create a regEx so i can thrigger a script only when i’m in an article. i tried this among other tests but it didn’t work and i’m not really the best guy building RegExs. So in my understanding the first part of this regEx (/blogs/) is trying just…
New Google Charts Error when clicking on row in table. Uncaught TypeError: b.split is not a function — Has been working for several years
We have multiple Google Visualization tables that we have been successfully using for several years. However, in the past week, we started seeing this error in many of them What we are trying to do is click on a row in a table to allow us to hyperlink to another page based on the contents in that row. As I
Display yellow warning message in console
I want to show a warning message in the Chrome console, like the highlighted item in this screenshot: console.log(message) displays a normal white message. console.error(message) creates an error message. But using console.warning(message) returns Uncaught TypeError: console.warning is not a function. So is t…
Javascript increment a variable in a function
Hey guys I’m new to programming, I need to make a website for school. I want to open the next page when pressing the arrow keys. So I thougt, I can put the URLs into an array an increment the index, when the button is pressed. Unfortunately I get some random numbers from 1 to 3 when I press the
How do I run a beforeEach in Cypress?
I’m currently building a test, and it seems that after the second and third test, the beforeEach is not getting the information that I need and is telling me that I’m having the following issue: cy….
Issue with component array filter
I want to create multiple components and delete them by pressing on button click. I created the components. But i can’t delete it. I wanted to give unique id to the Card component. But when i click one of cards’ buttons,all of cards are gone. I displayed the component array like this: Answer From …
Fill the empty values in my JSON (not null or “”)
I have a raw data that looks like that : I need to fill those empty values to be able to use it as an object. It’s not me who create it, I got it from an external source. I know how to fill those empty values if they were like “” or null. Sometime there is a coma after
Pick and return a pair of values from an array into two different outputs. JavaScript
I have a function that takes a random element from an array and, at the press of a button, returns the random value to an output. The code is as follows: So far the code is working perfectly, returning to the output a random value from the “questions” array. However, I need to take it a step furth…
Cleaning input versus not allowing input
I`m working on securing my website against XSS attacks starting with java script. I have read that I can escape user input using < etc.. However I personally would prefer to just not allow user input such as <, “, ‘, .cookies, alert(, etc.. Would there be a security risk in that method? Answ…