On Feb 11, 2008 9:50 PM, Urb LeJeune <[EMAIL PROTECTED]> wrote: > My knowledge of Java Script is limited to taking someone else's > script and making very minor changes. I would like to replicate PHP > ability to have an include file located somewhere that is not in the > normal web space. > > My clients have a document root of: > > /home/domain-name/htdocs > > I have php.ini configured to first look in the current directory and > then /usr/local/include so that every client on the same server uses the > same source code. Is the scheme doable using Jave Script? > > Thanks >
If I'm reading you correctly, you are trying to give each site access to the same javascript source for easy maintenance and code re-use. If that is the case, then the simple answer is to make the js script tag for each domain all refer to a single domain for js code: script src='http://master.example.com/js/path/to/script.js' Any domain can load js across domain boundaries. That is why cross-site scripting can be problematic. -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting annoying in email? _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php
