I am trying to remove some of the nested ajax jQuery calls that I just wrote. If I move part of the code to another function, I get the following warning when executed.
"Element referenced by ID/NAME in the global scope. Use W3C standard document.getElementById() instead."
This is one of the calls that trigger this warning:
var access_token = $("input#access_token").val();
Inside regular javascript is the top level of javascript ie Global. How to fix it?
Thanks.
source share