The onmouseover and onmouseout functions work perfectly in preview mode, but after exporting, they no longer work on the server. I suspect that a .js script isn’t exported by default. How can I fix this?
That would be very odd, but there’s no need to suspect. Just look at the live website’s HTML (right click > view page source) and scroll to bottom to see what JS files are loaded on the page. If your JS is present and not working, next step is to use Dev Tools (right click > inspect and select the console tab) to see if there are any JS errors.
Do you have a link to your live website we can look at?
Thank you for your response printninja. There is indeed a JavaScript that is present in the preview pages but not in the export, as shown below:
However, this turned out not to be the problem: “onmouseover” and similar events are standard HTML events and do not require additional JavaScript.
However, the server did not find the “onmouseover” and “onmouseout” images. The images are all located in the ‘images’ folder, which becomes the “assets/img/” folder during export.
Everywhere, Bootstrap Studio itself translates the name of an image, e.g. “image.png”, during preview or export, to “assets/img/image.png”, for example with Key ‘scr’ and Value “image.png”.
However, this is not the case for Key “Onmouseover” and Value “this.src=‘image.png’”, for example. Here, you have to specify the location of the image in the source code yourself, so Value = “this.src=‘ assets/img/image.png’”.
Confusing…
And to make it even more confusing, if you enable “Skip Unused images” in the “Export Settings”, Bootstrap Studio will not export these “onmouseover” images.
Bootstrap Studio is a wonderful tool, but there is still room for improvement.
I didn’t see anything in your post after “below:”
But yes, there are some disconnects in BSS you have to be careful of. For example, if you create CSS rules that are only used by a JavaScript, the program will say it’s “unused” CSS when you run “check for issues.” There are a couple of other “gotchas” I don’t recall at this moment.
The code is still there but one cannot view it, new try with som spaces
< script id = “bs-live-reload” data-sseport = “5000” data-lastchange =“1762094812409” src = “/js/livereload .js” >< / script >
Mayby I’ll post this disconnect as a “new idea”?