You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.
View groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
Hi I have a plugin which contains a java servlet which calls a web API and returns a JSON object, this all works great when I use this code in the chrome console:
AJS.$.getJSON("http://myLocalServer/jira/plugins/servlet/helloworld")
.done(
function(data)
{
console.log('data', data);
}
)
.fail(
function(error)
{
console.log('error', error);
}
);
however when I place this code in my velocity template
<script>
AJS.$(document).ready(
function()
{
AJS.$.getJSON("http://myLocalServer/jira/plugins/servlet/helloworld")
.done(
function(data)
{
console.log('data', data);
}
)
.fail(
function(error)
{
console.log('error', error);
}
);
);
});
</script>
The page freezes, I've debuged jira and put a break point in my servlet and it doesnt seem to be getting called, has anyone else had this trouble?
Thanks!
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events