Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Accessing AJS from an external Gadget

Mark DeMichele March 30, 2012

I'm writing an external gadget without a plugin. I got some basics down and figured out how to do stuff completely manually. However, I would like to take advantage of some of the built-in API from the AJS object.

The problem is that I don't seem to have access to it. I can cheat I think and do parent.AJS and grab it from I guess the dashboard page, but that doesn't seem right.

BTW, this gadget is for internal us and I'm assuming it will just be used within a JIRA dashboard.

I'm finding it hard to find good documentation on these external gadgets. It seems like most stuff is based on plug-in based gadgets. Is there a hidden resource somewhere that I'm missing?

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
David at David Simpson Apps
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
April 1, 2012

Provided that the gadget is hosted on the same host (so to speak), this is merely a matter of accessing the AJS object on the parent from within the gadget iframe e.g.

window.parent.document.AJS

If you're then calling something back in the iframe, you'll have to do, erm...

document.getElementById('gadgetIframeId').contentWindow.someFunction()

TAGS
AUG Leaders

Atlassian Community Events