Skip to main content
1-Visitor
Oct 9, 2017 4:14 PM UTC
Question

Embed javascript into banner

 I am trying to embed a Jira issue collector into our WC pages to collect tickets from users.  Jira created the issue collector and gave me the javascripts to embed.  I have tried to embed a variety of ways, but I cannot seem to get it to display or work correctly.  I've tried a couple ways shown below with no real success.  Both appear to load initally, then the button they are supposed to create disappears.  My console does not show errors, it just appears like the clickable button gets hidden or moved back in the page.  

 

I am just adding these into my banner.txt file.  I have the begin_custom.jspf modified to include the message banner.  Generally the message banner works okay.  Any pointers what I am doing wrong?  I'm not an html person. 

<script type="text/javascript" src="<Jira_page>/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector.js?locale=en-US&collectorId=cac99114"></script>

 

<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>jQuery.noConflict();</script>
// Requires jQuery!
jQuery.ajax({
url: "<Jira_page>/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector-embededjs/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector-embededjs.js?locale=en-US&collectorId=cac99114",
type: "get",
cache: true,
dataType: "script"
});

 

2 replies

15-Moonstone
Oct 10, 2017 1:21 PM UTC

Hello,

A few remarks :

Including JQuery's latest version may raise strange behaviors. PDMLink already includes JQuery, and not  the latest version.

For example, frameworks used in  PDMLink 10.2 ( Found with Chrome Library Detector, a plugin )

Sélection_043.png

Try with the provided JQuery.

 

Next, I don't know what Jira_Page is, but if it's a different server than PDMLink, you may hit the same origin issue.

See https://en.wikipedia.org/wiki/Same-origin_policy

 

 

Translate
mspencer1-VisitorAuthor
1-Visitor
Nov 1, 2017 10:48 AM UTC

I tried with the provided JQuery...it doesn't work either.  

 

Jira_Page is pointing to a cloud based server.  It is not the same as the WC server.  I can look into the same origin possibility.  

Translate