Streaming live at 10am (PST)

Long Javascript in .txt file not working

Hi,

I’m trying to add code that’s over 10,000 characters.

I am trying to follow the method of saving the js file as a .txt file. I’ve just testing with literally just this code first

$( document ).ready(function() {
alert(“Hello! I am an alert box!!”);
});

Uploaded to webflow then called in in the before body code section using

<script type=“text/javascript” src=“https://uploads-ssl.webflow.com/5fd13b6440d790c78d867ae4/60b5562027813d45e349b4f2_text.txt”></script>

But nothing I do works, am I missing something here?

Thanks.

Read Only Webflow - Alpha Decking

Is your alert Javascript code wrapped in an opening and closing script tag? It would appear like the below:

<script type=“text/javascript” src=“https://uploads-ssl.webflow.com/5fd13b6440d790c78d867ae4/60b5562027813d45e349b4f2_text.txt”></script>

<script>
$( document ).ready(function() {
alert(“Hello! I am an alert box!!”);
});
</script>

Sorry, have just seen this. Yes it is, have literally tried every combination of everything you can thing of and nothing works