The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

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.

TAGS
AUG Leaders

Atlassian Community Events