Explore the community Forums Lectora Lectora Questions & Answers Javascript file not found

Tagged: 

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #369740 Score: 0
    Profile photo of Nick Mizer
    Nick Mizer
    Member
    beginner
    intermediate
    picture perfect
    wise owl
    friend finder
    curious george
    @nmizer6275

    UPDATE: I got it to work by changing the type to Header Scripting and using the file dropdown instead of pointing to the file with the “edit” button. I’d still be curious if anyone knows why the meta tag method would just stop working.

    I have a project with a linked javascript file that I’ve been working on with no problem, but yesterday I started getting an error, “Failed to load resource: the server responded with a status of 404 (Not Found)” whenever I preview the project in a browser or publish it to html.

    I’m including the script using an html extension object, with type “Meta tags.” The script in the extension is

    <script src=”myScript.js”></script>

    and myScript.js is in the extern folder of the project.

    I have another project with the same setup, and it is working with no problems. Presumably I changed something somewhere that made it stop working, but I’m banging my head against the wall trying to figure out what it might be. I’ve also tried making a new file and linking that, in case something in myScript.js is bad, but I get the same error for an empty test.js file.

    I’m using Lectora 17. Any ideas on what might keep the html from seeing the js file would be greatly appreciated.

    Thanks in advance!

    #369742 Score: 0
    Profile photo of Darrel Somoza
    Darrel Somoza
    Member
    contributor
    friend finder
    beginner
    intermediate
    junior moderator
    advanced
    wise owl
    curious george
    profile
    209 pts
    @Klaatu

    Meta tags are for meta data, period. Use header scripting for Js. If you post your problem child we can take a look see.

    #369803 Score: 0
    Profile photo of Jason Dalrymple
    Jason Dalrymple
    Member
    beginner
    intermediate
    profile
    wise owl
    curious george
    contributor
    friend finder
    advanced
    picture perfect
    54 pts
    @JasonADal

    Would the path to the file be part of the issue? (Using the KISS method – is it plugged in?). If the file is in a subfolder, my instinct is that the src should point to the subfolder then the file:

    script src=”\extern\script.js”

    I know I’m a culprit of missing the simple things (notoriously, semi-colons in JS), so thought I’d put it out there.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.