It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Javascripts don't run in Confluence HTML-include macro

Gabrielle Gagnon Sep 10, 2013

We tried inserting Visio-generated HTML diagrams into Confluence 5.0 pages, using the HTML-include macro. The pages include Javascripts that link to and display the diagrams and supply pan and zoom functions, but the Javascripts never run.

I did the same thing at another site on Confluence 2.11, so I know the macro can run them, but it doesn't work here. Our admin said he tried a few things, but no Javascript runs on any HTML pages he includes, not just my Visio-generated code. He's enabled HTML and white-listed the URLS. Is there another setting he is missing?

5 answers

0 votes
Davin Studer Community Leader Sep 11, 2013

What is the content of the HTML macro?

0 votes
Davin Studer Community Leader Sep 11, 2013

So, just to clarify your are putting in a URL to another web page in the HTML-include macro and that page has the functionality to display the visio diagram? What happens when you go to that url directly?

0 votes
Davin Studer Community Leader Sep 11, 2013

What is the content of the HTML macro?

0 votes
Gabrielle Gagnon Sep 11, 2013

That's right. We enter a white-listed URL.

Going to the page directly in a browser runs the scripts so that a diagram is displayed on a page consisting of 2 frames. The diagram is displayed on the right side and the pan-and-zoom panel with some other functions is displayed on the left. It's the standard way Visio generates HTML diagrams.

I've attached the raw HTML file as generated by Visio. (It's too long to put in this comment.) We edit this so that all the addresses are absolute since Confluence requires that.

(I don't see the uploaded file here, but basically, it's almost all script functions. ) All that gets rendered on the page when the scripts don't run is a heading and a link to the diagram:

<body>

<h1>CMEfunctionalOverview_VML</h1>
<ul>
<li><a href="CMEfunctionalOverview_files/jpg_1.htm">Page-1</a></li>

</ul>

</body>

0 votes
Gabrielle Gagnon Sep 11, 2013

That's right. We enter a white-listed URL.

Going to the page directly in a browser runs the scripts so that a diagram is displayed on a page consisting of 2 frames. The diagram is displayed on the right side and the pan-and-zoom panel with some other functions is displayed on the left. It's the standard way Visio generates HTML diagrams.

I've attached the raw HTML file as generated by Visio. (It's too long to put in this comment.) We edit this so that all the addresses are absolute since Confluence requires that.

(I don't see the uploaded file here, but basically, it's almost all script functions. ) All that gets rendered on the page when the scripts don't run is a heading and a link to the diagram:

<body>

<h1>CMEfunctionalOverview_VML</h1>
<ul>
<li><a href="CMEfunctionalOverview_files/jpg_1.htm">Page-1</a></li>

</ul>

</body>

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Confluence

6 Awesome Ways to Apply Trello, JIRA and Confluence to your Project

I attended  Atlassian Summit 2019  and learned a lot from the presenters, attendees and knowledgeable Atlassian product managers. The presentations I attended focused on applying Agile, pla...

1,528 views 8 19
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you