Hide Annotations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-22-2011 05:08 PM
I've gotten the element ID and tried doing a .style.display='none'; This seemed like a long shot, so I'm not surprised it didn't work. Does anyone know how to conditionally show/hide an annotation?
Thanks!
Matt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2013 07:38 AM
The script that was posted above worked great.
Here is the Annotation
This "span" HTML element defines an ID, which can be used by code to find it and show/hide it. The client script to show/ hide this would look like this.
//to hide it
$("annotation_1").up(0).hide();
//to show it
$("annotation_1").up(0).show();
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-05-2014 02:01 PM
I am looking to do something similar...
I have an On Change Client Script, I would like to show an annotation label only show when a particular value is selected
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue == '') {
return;
}
if (newValue == 'Yes')
{
document.getElementById("ano1").parentNode.style.display="block";
}
else
{
document.getElementById("ano1").parentNode.style.display="none";
}
}
The choice value defaults to none, when I load the page, the label is still present. I only want the label to be present when "Yes" is selected as a choice.
Not sure what is missing to achieve this. Any ideas?