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

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

Embed javascript into banner

mspencer
5-Regular Member

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 2

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

 

 

mspencer
5-Regular Member
(To:olivierfresse)

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.  

Top Tags