tornir: Cat under a car, surrounded by tools. (Cat Mechanic)
Tornir the Leopardess ([personal profile] tornir) wrote in [community profile] javascript 2019-06-10 07:46 am (UTC)

Not related. I forgot to change the permissions on the DW gallery uploads; they should work now.

It seems I was trying to read the values before the images had finished loading, hence the zero values. I'm guessing browser cache was responsible for the F5 success. That bit is now working consistently (and in Chrome) after adding an onload="xxx()" call to another function in the image tags, and getting the values there.
I've now run in to a problem with variable initialisation. Despite the fact that the w3schools site states that redeclared variables don't lose existing values, that doesn't seem to be working when calling different functions; they're appear to be reinitialised or set to whatever is in the declaration block with each new call, but that may be another timing issue
Cookies also seem to be losing data, but I need to check if the data is actually there and I'm managing to overwrite it, or if they're reinitialising too.

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting