Skip to content

Unknown problem with (probably) POST method

This task is quite simple but I just can’t seem to get it to work. What the outcome should be is explained in the picture below. I guess that there is some kind of a problem with POST in php, but I’m not sure. Do you see what’s the problem that’s causing this not to work? Problem: No r…

How to make navbar change color on scroll?

I have a transparent nav bar which on scroll is transparent. This means that if i were to scoll to a place that did not have a solid background color it would clash with other elements such as text. I would like to transtition into a different color to make it stand out more (including making the logo and a

Remove and Modify key from object

I have following object I want to remove is_exchange and replace value of created_at to “2021-03-23” and get back the json representation of the object I tried like which is working but is not working Answer To remove a value from an object use the delete method. So, you could do delete obj.payloa…

filter value of select to do a partial sum

Having two classes professor and student: professor.ts student.ts To add up the scores of each student relative to his teacher I did: This is the HTML of the page: How can I do a partial sum of the selections, assuming for example that I have 5 professor with 1 student for every professor, and want to add onl…

JavaScript grow and shrink “ball” object

started to learn a bit javascript and I ran into a mission to get a “ball” bigger and bigger when I am cliking it( the ball starts from 100 and grow by 50 each click). so when it’s getting too 400 its should shrink its size by 50 till the ball gets again to 100 and then he grow. so

Why won’t setMatrix([…matrix, [[x][y]]]) work?

I want to add the coordinates x and y (from the loop) to the state (matrix) like you can see in my example but it won’t work. Can someone help me? Answer The problem is in expression [x][y] which evaluates to undefined. [x] defines an array containing one element x [x][y] tries to index the [x] array, t…