I’m using the HTML Widget to point to a 3rd party php calendar script on my server. I’ve pasted the code into the code editor and checked it’s identical to that provided by the 3rd party. I believe the code pasted is a mix of HTML and JS.
I’ve had it working perfectly for a couple of years in previous versions of Blocs, but then I manually added it with BBEdit after exporting from Blocs but before uploading.
I, maybe wrongly, assumed that in Blocs 3 we would be able to use the widget with JS. To the point, the problem I’m having now is Blocs is inserting a little bit of code in the middle of the script that throws an error and doesn’t display the calendar. It is added during exporting as it can be seen in the developer tools option in Blocs preview mode.
The code I’m pasting is
<link href="http://www.10thestrand.co.uk/script/index.php?controller=pjFront&action=pjActionLoadCss&cid=2" type="text/css" rel="stylesheet">
<script type="text/javascript" src="http://www.10thestrand.co.uk/script/index.php?controller=pjFront&action=pjActionLoad&cid=2&view=3"></script>
What’s being exported is
<link href="http://www.10thestrand.co.uk/script/index.php?controller=pjFront&action=pjActionLoadCss&cid=2" type="text/css" rel="stylesheet">
<script type="text/javascript" src="img/lazyload-ph.png" data-src="http://www.10thestrand.co.uk/script/index.php?controller=pjFront&action=pjActionLoad&cid=2&view=3"></script>
The section
src=“img/lazyload-ph.png”
is being added on export.
The error throw up is
SyntaxError: Invalid character ‘\u65533’ lazyload-ph.png:1
Not too serious a problem as I can still revert to correcting it in BBEdit and then uploading.
I do have the live Preview unchecked in the HTML widget and have turned off ‘Use a preloader’ in the Project Settings, not sure if it’s related though
Any ideas?
@Norm A huge pat on the back for a wonderful upgrade!
Thanks, David