How do I load external file without php

I am currently doing a project - originally I was asked to do this in php but I have now been asked NOT to do any PHP.
I’ve been provided the asp page which is already done by another developer and am trying to call this up from my page as I did with php.

<script LANGUAGE=Javascript>  
document.getElementById("wb_Text3").innerHTML = "<?php require('./php/test2.php'); ?>";
</script>

It was done this way so that the name of the php file was hidden, now this needs to call up the fred.asp and run the script in there. What is the javascript equivalent to the php require please.

What is the name of the file the script above is located in? Does it have an asp extension? If it does, you should be able to write:

<!--#include file="fred.asp"-->

assuming it is in the same directory that the file including it is in.

What code is in fred.asp?

I have simplified the project to get a result…
The html page is:

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Simple Task</title>

</head>
<body>
<div id="container">
<div id="wb_Text3" style="position:absolute;left:75px;top:242px;width:310px;height:89px;z-index:2;">
<span style="color:#000000;font-family:Arial;font-size:13px;">Text3<br><br><br><br><br></span></div>
</div>



<script LANGUAGE=Javascript>  
	document.getElementById("wb_Text3").innerHTML = "<!--#include file="andrew.asp"-->";
</script></body>
</html>

The .asp page looks like this:

<%
	response.Write "SERVER SIDE SCRIPT"
%>

What I want is for the code in andrew.asp to execute and return to the textbox on the screen

So your file is an HTML file. That means you can not use my suggestion. I said you could use the include only if the file trying to include it has an asp extension.

Another option is to use fetch to get the contents of the asp file and then assign it to the innerHTML.

<script LANGUAGE=Javascript>
  fetch('andrew..asp')
    .then(response => response.text())
    .then(text => {
        document.getElementById("wb_Text3").innerHTML = text;
    })
    .catch(error => {
        console.log(error)
    });  
</script>

I honestly do not understand why you would want to use ASP instead of PHP. No one uses Classic ASP anymore for new projects.

My Brother is also a programmer and is old fashioned.
I went to all the bother of learning some php but he (who is the boss) wants me to go old-school.
I went to university - he did not but hey-Ho! Hes the boss.
Thank you for your help.

If your brother already knows ASP, then he should be able to write the code in less than a minute.

no time - he’s delegated me…

I would suggest going through some ASP tutorials then.