javascriptshtml

Calling a js function within shtml


I've been asked to fix a broken breadcrumb, but never worked with SSI shtml, so please bear with me.

They are trying to call a js function from within shtml that is being called by another shtml.

main.shmtl

<!--#include virtual /shtml/abreadcrumb.shtml"-->

abreadcrcumb.shtml

<script src="script/location/abreadcrumb.js">
<script>
     callabreadcrumb();
</script>

the js has been working until it was dropped into shtml, so I am not tinkering with it.


Solution

  • You have to close the first script tag:

    <script src="script/location/abreadcrumb.js"></script>
    <script>
         callabreadcrumb();
    </script>