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
‎04-21-2011 10:40 AM
The Section and Line Separators do not have specific IDs or even good distinguishing attributes to be able to specify a good selector and hide them.
You could always use the custom separator and put in your own HTML, with a unique ID to use in your script. You could look at the HTML source for a current line separator and try to recreate that in a custom annotation with your ID.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-21-2011 10:45 AM
Thanks for the idea! I'll try it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-24-2011 04:44 PM
Awesome! U rock!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-21-2011 07:19 PM
You should be able to use the nextSibling method to hide the annotation. I would use firebug (in FireFox) to see what field is before that annotation and get the id of that field then use nextSibling.
Here is a reference on nextSibling
http://reference.sitepoint.com/javascript/Node/nextSibling
I did something similar here with DOM manipulation
How to change the "Incident" label on the incident form
You could do something like:
var annotation = gel('my_field').nextSibling;
g_form.setDisplay(annotation, false);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-09-2011 12:38 PM
imartez
Hi Ivan,
I believe that code requires you to include the table for the gel parameter. For example:
[/quote]
var annotation = gel('table.my_field').nextSibling;
g_form.setDisplay(annotation, false);
However I still get the following error: "id.indexOf is not a function" any idea?