Javascript in create and edit screen

Dave Bosman [Realdolmen]
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.
October 29, 2018

Hi, 

I am trying to run javascript to show a custom description when clicked on an icon in edit and create screen of an issue. 

It seems to be working in a single issue.

But when i am in the projects issuelist and select another issue, click on the icon, the create or edit screen closes. When i reopen it and click the icon again, it works. 

Javascript in plugin

function showHelp(id) {
var listenersDiv = document.getElementById(id);
if (listenersDiv.style.display == 'none') {
listenersDiv.style.display = '';
}
else {
listenersDiv.style.display='none';
}
}

HTML in desciption of custom field

Click to show some extra info.
<a href="#" class="help-lnk" title="Click to show some extra info."
onclick="return showHelp('REPLACE ME')">
<
span class="aui-icon aui-icon-small aui-iconfont-help"></a>
<div class="customHelpToolTip" id="REPLACE ME" style="display:none">
This is some extra info </div>

 

for context i used <context>atl.general</context>

What am i doing wrong? Why does it not work from the first time when i select another issue in the list and only after a refresh? 

 

Regards

Dave

0 answers

Suggest an answer

Log in or Sign up to answer