> Both parts of the script contain only absolute links.
If that is true, it's difficult to understand why you'd have a problem.
For further investigation, I'd suggest a review of your server error log file, and using a server headers checker such as the "Live HTTP Headers" add-on for Firefox and Mozilla-based browsers. Using these tools, you can get a better view of the requests that the server is receiving, the filepaths that the requested URLs resolve to, and the responses that your server is sending to the client.
Thanks for your reply jdMorgan - Nothing shows on the error log I moved the .js into the same folder as the index file and it all works as expected.
There seems to be some unexpected results when calling included files from a sub-domain, but I can't find any "rule of Thumb" to explain so I can understand it. I have had similiar problems in the past with Style sheets not working when requested from the root folder to a sub-domain.
If someone you point me to a solution to this I will be very grateful. (Please do not use tech language to explain) I have read lots of posts/replies about .htaccess and folders, but can't get my head around it because I don't understand the tech terminology.
I found most of the answer on a different forum. "the subdomain is a different domain altogether, and relative links will only work within the same webspace" - therefore links to another folder(even though they are on the same server) need to be absolute.