Forum OpenACS Development: Is it the broswer or Javascript

Request notifications

Posted by Iuri Sampaio on
Hi there,

Sometimes I spend hours in analys for a certain issue related to whether browser or javascript. I have the same javascript lines of code within two different files and the results is different

It's plain and simple I have a funtion

function CheckAvailability(){
// $('body,html').animate({scrollTop: 0},300);

This chunk works just fine when any Retreat page is called:

But it doesn't on a Discovery page:

I'm intended to point the issue to JS libraries. Still assuming the pages have the same call to libraries.

Has anyone ever faced such a thing?

Posted by Iuri Sampaio on

init_values() was the cause. There were a few lines with non existent vars on Discovery pages that caused the JS failure. Sometimes, JS is hard to track.

Best wishes