Not sure if this is possible, can you help?
-made a function_1 that sets the value of a variable
-a different site is calling a function_2 in the same .js script
-need function_2 to call the variable that was set in function_1
-basically I need a function to call a variable that was set in another function
is it possible? how do I do this?
If I understand you correctly, it shouldn't be. Two different sites interacting via variables in JS would be... for lack of a better word, impossible. (Even with global JS variables, the variables are accessible only by the local site)
You could place both functions into one external file, link to it from both pages, and just make the variable in the first function that you want in the second global. Hope this helps.
The shared JS file will have two instances of it, the variables can not be shared.
Originally Posted by amars1983