Álvaro N. Franz
Álvaro N. Franz

Reputation: 1228

Include js file out of domain

I am trying to include a javascript file within a page located on the root of my domain, as follows:

<script src="../../js/typeahead.js"></script>

As you an see, the file is BEYOND the domain root. How can I include this file without absolute paths? Thanks for you time, have a nice to-day.

Structure:

/js
/sites/example/file

Domain.tld root is /sites/example/ and I am calling the js from file

Upvotes: 1

Views: 241

Answers (1)

SHIN
SHIN

Reputation: 386

you can include if it has a global access.

 like http://domainname/folsers/somefile.js

otherwise you cannot.

Upvotes: 1

Related Questions