Javascript in the onReady() function

Hello everyone, for a few weeks the javascript code inside the onReady() function of dynamic pages, it is not executed.
I had to place a button’s onClick event on dynamic pages to “force” the code to run.
As always all of this happened without any code changes.

Thanks
Claudio

Hi @claudio-d-ambrosio ! There could be several reasons why the JavaScript code inside the onReady() function of dynamic pages is not being executed. One possible reason is that there may be a syntax error or some other error in the code that is causing it to fail. You can check the browser console for any error messages that may be related to the code. As for why placing a button’s onClick event on dynamic pages “forces” the code to run, it’s difficult to say without more information about the code and how it’s being used. It’s possible that the button click is triggering some other code that is needed for the onReady() function to work correctly. Good luck!

Thanks for the answer, there is no syntax error and, again, this abnormal behavior started a couple of weeks ago, without making any changes.
Instead for the button that I had to insert on the page, this executes the same code present in the function onReady(), and so the code is correctly executed.
However I have solved with the button like many other strange situations in the past. Fortunately I don’t pay any subscription so that’s okay.

Thanks again

Hi Claudio. If you are experiencing something that is not due to any code changes you made, I reccomend starting an issue with customer care first so they can investigate and send to the correct teams should there be a bug.

Here is a link if you need it https://support.wix.com/en/article/contacting-wix-customer-care-for-support

ok thanks

1 Like

I appreciate the time you took in this response, but the suggestions you have made are not specific to Wix/Velo and will not work in this environment.