Is there a way to use \"<%= someObject.ClientID %>\" in an external javascript file?
If I use the code
<%= someObject.ClientID %>
No, it won't work like that because the javascript file is being transmitted independently as a separate file and it isn't parsed by ASP.NET on the way out, while your aspx file IS being parsed and the .NET engine is replacing the tag w/ the actual value.
Now when your objects call those JS functions, what they could do is pass references to themselves into the function, or even pass in a dictionary list of some sort with your own key for what the control is and the assigned name.
One thing to think about as well - IF you are going to make a JS file independent of an ASPX page, then that JS file absolutely should not presume to know anything about the specific controls of the aspx file that calls it - because later on someone else might decide, "Oh that's a good JS file, I'll incorporate it too" and it won't work for them cause their objects wont match yours. Thus the pattern you should follow would have to be more generic - thus why you'd want to pass in references or lists of identifiers.
You could create an empty callback function in the external file:
var MyCallback = function () { };
And then in the asp/cx do something like:
MyCallback = function () {return "<%= someObject.ClientID %>";}
And then, back in your external file:
var myClientID = MyCallback();