I am trying to access a global variable I created using javascript within a content node i created. In an attached js file i have var rootpath = "/clients/UMP/";
Inside of my drupal page i have:
<script>document.write(window.rootpath);</script>
But it just shows the text: undefined
Am i doing something wrong? Is there a more better way to do it using php perhaps? Thank you for taking the time to read this and respond. I apologize for being such a noob with drupal. I have only been using it for a few weeks.
image1.jpg
changes folders between servers ie..devserver.com/images/image1.jpg
andliveserver.com/anotherfolder/image1.jpg
. Are you using absolute URL's for all your resources?<img src="/sites/default/files/pictures/apple-logo.png">
Because of this i used absolute urls instead.