Java Script in a Confluence Page

Craig Hylwa
Contributor
January 16, 2012

I would like to place the java script below in a Confluence Page what would be the way to do this?

<SCRIPT LANGUAGE=JavaScript SRC="http://noetix.intra.cerveceriaindia.com:80/NoetixGateway/ExecEmbeddedReportSimpleParamValues.aspx?name=7575d6a9-5716-49f9-8257-882918f7378a&type=user&prompt=no&nwq_vdir=nwq&eheight=300&uid=7B350FEE3A2D854C42E06C95930D2358&pwd=8FC025CE6E898FD4DB2480B3EAC4E354&applicationlogindata=B9202BE9E9A0221B3ED8EA9D77358F434CDA85D9DA3EC069746DDE045904D0E0&secure=bound&version=3"></SCRIPT>

2 answers

1 accepted

2 votes
Answer accepted
Renjith Pillai
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 16, 2012

Use the {html} macro and put this script between that.

SarahA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 16, 2012

Hallo Craig and Renjith

Renjith is right: the HTML macro will do the trick. I'm just adding a note that the macro is disabled by default on Confluence. The site administrator can enable it.

It's disabled by default because of the security implications of allowing people to add HTML and Javascript to a page. Before enabling it, it's worth considering whether all the potential authors are trusted. People will be able to use the HTML macro in comments and blog posts as well as on the page.

Here's the documentation:

http://confluence.atlassian.com/display/DOC/Enabling+HTML+macros

I hope this helps. :)

Cheers, Sarah

Craig Hylwa
Contributor
January 17, 2012

Thanks for the answers, the comment regarding the HTML marco being disabled by default was an important note!

1 vote
David Peterson
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 17, 2012
The alternative to the {html} macro would be to add it as a User Macro. That way, it is safely output on the page, but you don't require opening yourself to other, more malicious JavaScript.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events