I am loading my script like this:
var myTestString = "/modules/admin";
$.ajax({
type: "GET",
url: "../../includes/test_tooltip.js",
data: "module="+myTestString,
dataType: "script"
});
Is it possible to have access to module variable in my test_tooltip.js like this?
console.log("I am loaded!" + module);
My scenario is like this. I sometimes need to load that javascript and when i do, i do it in different modules, and i need this javascript to know which module because he will have to do some requests based on the module.
In php i know you can acces data with $_REQUEST["module"], if it could be done in javascript similar would be great.
window.variableanddelete window.variableand case closed. Thanks guys!