JS only works after console.log

I created a back button that goes back to the previous page form and stores the values ​​in <select>

, I pass the values ​​in the session and then via JS select the appropriate value.

The code works.

The problem is that some time ago the code stopped working. I reworked the code - nothing changes. To check, before the actual change happens, I put console.log()

to see if the values ​​passed and after that the code magically started working.

Edit: After I reset the code to its original state, everything works as expected.

Does anyone know what is going on and how can I ensure it doesn't happen again?

+3


source to share


1 answer


You should provide code examples like in jsfiddle



0


source







All Articles