• I have a JS file that I have added to my header like so

    <script language=”JavaScript” src=”<?php bloginfo(‘url’) ?>/wp-content/themes/mytheme/myscript.js”></script>

    however in the js file i like to an image like so

    <img src=”location/of/image.jpg” />

    however the image just doesn’t show up period. and I’m thinking its because the src of the image is wrong. how do I know where the script is being executed from so I can input the proper source? I want to avoid using http://mysite.com/location/of/image, but if nothing else works, I may be forced to use that.

    Thanks

The topic ‘external link in js’ is closed to new replies.