Hi ,
I want the help icon next to custom field. When i added the javascript in the description, the help icon appears under the custom field.
Here is the code:
<script type="text/javascript">
function showHelp() {
var listenersDiv = document.getElementById("impact");
if (listenersDiv.style.display == 'none') {
listenersDiv.style.display = '';
} else {
listenersDiv.style.display='none';
}
}
</script>
<a href="#" onclick="showHelp(); return false;"><img src="/images/icons/ico_help.png"/></a>
<div id="impact" style="display:none">
Impact and Urgency ******
</div>
Thanks
Swarna
Hi Swarna,
try this below JavaScript
<script type="text/javascript">
var p = jQuery("#customfield_14202"); //Custom_field ID
function fnOnClickHandler(popUp,page){
popUp.hide();
}
function getpopUp(){
var popUp= new AJS.Dialog({
width:700,
height:425,
id:"mypop",
closeOnOutsideClick:true
});
popUp.addPage();
popUp.addHeader("Definitions", "title-class"); // Header
popUp.addPanel("Panel", "<p>Text here</p>", 'panel-body'); //Body
popUp.addLink("Quit", fnOnClickHandler, "link-class-name", "");
return popUp;
}
function getHelp(popUp){
popUp.show();
}
if(p){
var img = document.createElement("img");
jQuery(img).attr("src","/images/icons/ico_help.png");
var a = document.createElement('a');
var popUp=getpopUp();
a.href='javascript:getHelp(popUp);';
jQuery(a).append(img);
jQuery(p).after(a);
}
</script>
Note: Add this code in field configuration.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.