So I been playing around with the way to invoke data froma different server. However I had this issue where I tried to load the data from:
<body onload="include('http://192.168.2.../file.txt');">
And didn't work however when I a script href="http://.../file.js" it works, can someone tell me why the first one didn't?

According to this tutorial both methods are valid:

Our JavaScript calls a function which uses the remote scripting object to get the file at the URL given. The file is simply returned to us as a string of characters, which are loaded into an HTML division. The string returned could be placed in nearly any HTML container or simply written to the browser window using a document.write command. To call the function is simple;
Calling include() With The Onload Event
<body onload="include('');">

In the example we use the body onload event to execute the include(URL) command.
and later on:
Besides, we can do it as simply as a Server Side Include...thus.
A JavaScript Include

Simply add one line to the head of your page to enable the include function.
Just Add One Line To The Head Section
<script type="text/javascript" src="include.js"></script>

A live example of the simple client side include function