Import Javascript from BitBucket

Wesley Frye February 4, 2020

I've got some javascript that I'm running in an html block on a page I have and I'd really like to just use the .js file in our internal bitbucket instead of copying and pasting it into a script block. So something like this...

 

<html><body>

....

<script src="https://bitbucket.internal.domain.com/repo/and/path/MyScript.js">

AJS.toInit(function() {

MyScriptFunction1();

});

</body></html>

 

If I look in chrome's developer tools it shows that the script is being included but nothing in my script block is ever running. I even stripped everything out and tried just having a console.log("Did this run?"); call in there and saw nothing. 

 

P.S. I'm basically a rookie to web development so it's a pretty good chance I'm missing a is the sky blue piece here.

 

1 answer

1 accepted

0 votes
Answer accepted
Wesley Frye February 4, 2020

Like I said, is the sky blue. The src needed to be in a different element than the code block.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events