Frage

For some reason, relative URLs are not working OR I am using the wrong syntax. I have tried the following with no luck on my CEWP HTML page.

<script src="/jslib/jquery351/jquery351.min.js"></script>
<script src="../jslib/jquery351/jquery351.min.js"></script>
<script src="/../jslib/jquery351/jquery351.min.js"></script>
<script src="/.../jslib/jquery351/jquery351.min.js"></script>
<script src=".../jslib/jquery351/jquery351.min.js"></script>
<script src="~jslib/jquery351/jquery351.min.js"></script>

I was thinking of using the _spPageContextInfo.siteAbsoluteUrl function but I'm having issues implementing it into the HTML page to dynamically create the src string dynamically and having absolute URLs for test and production is getting old.

In a previous job, these worked so I'm wondering if this is a server setting out of curiosity.

Thanks.

War es hilfreich?

Lösung

Try this

<script src="../../jslib/jquery351/jquery351.min.js"></script>
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit sharepoint.stackexchange
scroll top