I\'ve got a weird question in that I need to inject some javascript into another javascript function. I am using a framework which is locked so I can not change the existing fun
I'm not sure what you mean by "locked" - JavaScript is interpreted by your browser. Even if it has been minified or encoded, you can still copy the source of that function from source of the page of script. At that point, you reassign the original function to one of your own design, which contains the copied code plus your own.
var id;
var myFunction = function() {
// code copied from their source, which contains the variable needed
// insert your own code, such as for copying the needed value
id = theirIDvalue;
// return the value as originally designed by the function
return theirValue;
};
theirObject.theirFunction = myFunction;