You can't use server side code into a separate JS file
'<%=((TextBox)TwoInstances1.FindControl("txt_text")).ClientID%>'
Solution:
create function with parameter into a JS file
function fnCheck(a) {....}
and call the function from aspx page like
<script>
fnCheck('<%=((TextBox)TwoInstances1.FindControl("txt_text")).ClientID%>');
</script>