Javascript Src Path

javascript

Solution

Try:

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

Note the forward slash.

Problem

I'm having some trouble with the following code within my Index.html file: ``` <SCRIPT LANGUAGE="JavaScript" SRC="clock.js"></SCRIPT> ``` This works when my `Index.html` file is in the same folder as `clock.js`. Both Index.html and clock.js are in my root folder. But when my index.html is in these different directories clock.js does not load: ``` /products/index.html /products/details/index.html ``` What can I put as the 'SRC' so that it will always look for `clock.js` in the root folder?

Original source