Hide Annotation with Client Script

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-09-2009 12:46 PM
Is it possible to hide an Annotation with a client script the way we can make fields visible/invisible?
I'd like to be able to hide an Annotation along with a set of fields for a specific set of users.
As a workaround, I suppose I could create an actual field with a colored label, but that seems like brute force.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2010 08:54 AM
Its possible to hide a custom annotation with client script
When you create custom annotation , you can use HTML tags.
Try using the Div tag in the Annotation Text
div id="div1" (enclose this within "<" and ">")
( end "div" tag)
Now it can be hidden using the following in the client script,
if (condition)
{
div1.style.display = 'none';
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-23-2010 06:00 AM
I just used this and it works great!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-25-2011 07:42 AM
A small addition to this technique. We were finding it a little disconcerting that the annotation was appearing as the form was being built on the screen, then disappearing if the conditions for displaying it weren't met. So, we decided to do things the other way around. We defined the annotation such that by default it would not be displayed, then in the client script, if the conditions matched, we set the attribute to display it.
The Annotation was something like:
<div id="majinc" style="display:none">
Major Incident
</div>
The client script included:
var mi = g_form.getValue('u_major_incident');
if (mi == "true") {
majinc.style.display = "block";
}
Brian Broadhurst (TeamUltra Ltd.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-06-2014 09:21 AM
Is this client script "On Load" or "On Change"?