Hi Chris,
My libraries are set up like the example near the bottom of that wiki (the one that says "Table Control Library that will Work on all GUIs").
I was basically accessing it as shown in the wiki as well, except I was (I believe) storing them in a global variable instead of a local variable. If you look at the code in my initial post, I'm checking to see if the library variable exists and only loading the variable if it does not.
My JavaScript research had indicated that variables defined with 'var' have a local scope, while those defined without 'var' have a global scope. However, it also states that global variables are not created automatically in 'Strict Mode'. SP6 is display a number of errors in my scripts that didn't show as errors in SP5, so I'm assuming SP6 has implemented the strict mode.
So now I'm trying to find a way to create global variables under SP6. I could switch my code to use a local variable by adding 'var', but this seems like unnecessary overhead to load the global library every time my script runs (it's in a onLoad event). I tried to use the session.utils.put command to store my library in a session variable, but that generates an error saying the put value needs to be a string.
Any other thoughts on how I can storie the library in a global variable?
Thanks,
Jeff
Hi Jeff,
Please check this wiki page.
Let me know whether it worked for you.
Thanks and regards,
Cris
Add comment