Using javascript to show all comments on startup

I would like all comments to show on all documents when a document is opened.  Right now I have the following code to create a menu option. This runs fine, but when I make a simple call to showAllComments(), I get the error "this.syncAnnotScan(); is not a function"  How can I get the function showAllComments() to run when Adobe Reader is opened?
if ( typeof sdkMenuItem == "undefined")
          var sdkMenuItem = false;
if (!sdkMenuItem) {
          sdkMenuItem = true;
          app.addSubMenu( {
             cName:"ACROSDK:JSSubMenu",
             cUser: "Acrobat SDK JavaScript",
             cParent: "Edit",
             nPos: 0
app.addMenuItem({
   cName:"ACROSDK:ShowAllComments",
   cUser:"Show All Comments",
   cParent: "ACROSDK:JSSubMenu",
   cExec: "showAllComments();",
   cEnable: "event.rc = (event.target != null);" // active only with docs open
* main function
function showAllComments()
    try {
                        this.syncAnnotScan();
                    var annots = this.getAnnots();
                    if (annots == null) { app.alert('not found'); }
                    for (var i=0; i<annots.length; i++)
                                        annots[i].hidden = false;
   catch(e){app.alert(e);}

You shouldn't have to put it inside a <tr><td> to get it to work. I've done what you are trying to do with <span></span> and it worked fine. I haven't tried it with a <div> but I can't image why that wouldn't work. Maybe you could post your code.

Similar Messages

  • Ibooke freezes when minimizing or using expose to show all windows

    I have a bought a refurbished ibook from the mac refurb site 2 weeks ago, no other hardware, and have only installed office 2004.
    It freezes often when several windows are open and i use expose to show all windows (approx 1 time in 2), and also when i minimise a window if a few apps are open. (approx 1 time in 3 or 4)
    When frozen it just hangs & shows rotating disk & only way out is to restart using power button.
    I Have tried hardware tests & disk utility etc...
    Any other suggestions? or anyone else having a similar problem?
    Would prefer to resolve myself as opposed to sending back on guarantee as I need it daily..
    THANKS

    furthermore..
    i have spent so much time trying to sort this out over the past week that my girlfriend has given me an ultamatum;
    either the computer goes... or she goes...
    has anyone else discovered that buying an ibook has had such a dramatic effect on thier relationship? and has anyone got any suggestions how to resolve this?
    i think the computer has to go back to apple... unless someone comes up with a fast fix.......

  • Captivate: Using Javascript to show/hide text captions

    Hello,
    I want to show/hide a text caption using javascript. I can't find the way of doing it with advanced actions. I dont know if it's because it belongs to a question slide in a pool. Does somebody knows if it's possible and how it can be done??

    You can set the length of the variable when you insert it.
    15 characters is just the default setting.
    What I meant by COULD is that the kind of thing you are asking about here (using JavaScript to hide objects inside a Captivate movie at runtime) is not as simple as you'd like it to be.
    JavaScript is not my particular area of expertise, but there are some people that chime in on this forum that ARE experts at JS. But I think they would also be the first to say that it's not as simple a thing to pull off as just "knowing the command to hide/show an object".
    The easiest tool to use in Captivate for showing or hiding objects is Advanced Actions.  The next easiest thing to use is ActionScript 3, and that's hard.  JavaScript is a very useful programming language, but it spends all of its life outside the Captivate movie looking in through AS3's External Interface.  So JS alone is not going to solve all your issues.

  • How hard is it to use javascript to show/hide fields. Is it easier to use the action builder?

    I know nothing about javascript and all that ive been using so far has been stuff ive found on here (thank you everyone).
    Using the action builder seems like its gonna be very tedious to do since i have so many subforms that hide, would it be esier to use javascript?

    I know nothing about javascript myself but I just created a form with about 10 different subform that show or hide depending on what the user chooses from a drop down list and I used Action Builder. If we don't know javascript, how can we use it? But Action Builder did a fine job of hiding/showing wherever I needed it. And Action Builder can do more than one thing by clicking that + sign when you are building an action.
    For instance, I needed to place a button in each subform that would close both the field that the person was working in and also the subform on the next page where the information was going into floating fields in a text block that was only visible thru a drop down list text select. I could have never figured out how to do that based on my knowledge of javascript. Thank Adobe for including Action Builder in this version of LiveCycle and I use it all the time. I find it extremely easy to use but it takes a little mental training to think thru the steps of how you can use the menu in Action Builder to make your form do what you need it to do.
    And if all else fails, ask this forum. I struggle for just so long before I come here and ask for help. I always get the answer I need. I hope you will too.
    Good luck,
    Jeanette

  • Using iTunes Match, Show All Music not working for one playlist

    I am using an iPhone 6 Plus with iOS 8.2. I just recently subscribed to iTunes Match and all of my music has been matched/uploaded.
    When I turn on iTunes Match and Show All Music on my iPhone, all of my playlists show up but one of them is incomplete, and doesn't have an option to download the missing songs from the cloud.
    So, for example, I have a playlist that on my Mac has 696 songs and they are all matched by iTunes Match, and they all appear as either already on my phone or downloadable. Most of the other playlists are the same: working as expected. But I also have a playlist that on my Mac has 58 songs and they are all matched by iTunes Match, but only nine of them appear on my phone (they were already there), and none of the remaining 49 are showing as available to download from the cloud.
    Is it possible to fix this? I've had bad luck in the past deleting playlists on the phone with the goal of having them refresh during the next sync. (The bad luck involved my playlists being deleted in iTunes on my Mac after the sync.)

    Hi Michael,
    thanks for this, this helped me out as I just had the same issue but on my iPad lol.
    Forgot about that setting even though I knew about it, just goes to show, out of sight, out of mind.
    Regards,
    Steve

  • Using JavaScript to show/hide fragments

    Hi,
    Can anyone point me in the direction of information or an example of JavaScript being used to show or hide fragments within a form?
    I'm looking to add JavaScript to the XDP content of my fragments so that these fragments will be shown or hidden depending on the evaluation of certain conditions.
    If I create a form, and reference a fragment within that, then I can hide the fragment using this JavasScipt embedded within the form:
    xfa.form.MyForm.MyForm.MyFragment.presence="hidden"
    However, I'm looking to add the JavaScript to my fragment. I've used similar JavaScript but when the form and fragment are assembled the fragment is always displayed.
    Can anyone help here please?
    Thanks,
    Ray.

    Hi,
    Can anyone help here at all?
    All that I need for now is how to get JavaScript included in my fragment invoked when a form that includes that fragment is assembled.
    When the fragment is rendered by itself the JavaScript is invoked. But not when it's rendered from within another form. Why is this?
    Thanks,
    Ray.

  • Using javascript to show/hide buttons

    I need to show a hidden button on a slide, but I need to do it from within a javascript that is being called.  Does anyone know how to do this?  I know there are functions you can use to get/set variables (cpEIGetValue) but I don't know how to access &/or manipulate objects...
    Help?
    Thanks - Monica

    Hello,
    I'm sure this could work with advanced actions
    Since I have been blogging and writing a lot about advanced actions, perhaps I could help to debug? If this is acceptable to you, I will have a look at your actions, and try to understand what you want to realize. What do you think?
    Here is a link to my blog, just to prove my credibility:
    lilybiri's posterous
    Lilybiri

  • How to avoid using subfolders in libraries and use views to show all data

    Hi all
    I am very new to Sharepoint design so hopefully I can explain what I need properly.
    I have a sharepoint site which I upload a lot of data to. Most of the data I can categorise into subfolders (Location and Year). Instead of having the same subfolders in each library I wanted the user to select the Location and Year they want from a dropdown
    and then refresh a List webpart based on their requirements.
    Is this easy to do?
    Would I have to create new columns called Location and Year in order to do this?
    Thanks for any help
    Raiyan

    Yes, you can do so. 
    You can create a view to show data based on location and year
    http://blog.pentalogic.net/2008/10/advanced-sharepoint-view-and-filters/
    http://howididit-sharepoint.blogspot.in/2012/04/filtering-lookup-columns.html
    http://stackoverflow.com/questions/18362853/how-do-i-filter-by-today-and-time-in-sharepoint-list-view
    In SharePoint Designer I edit the calm query from my view in Advanced Mode. And I add
    IncludeTimeValue="True" in calm tag Value Type="DateTime". I'm filtering my results by time.  
    <Query>
    <OrderBy>
    <FieldRef Name="Modified" Ascending="FALSE"/>
    </OrderBy>
    <Where>
    <Or>
    <Gt>
    <FieldRef Name="Start"/>
    <Value Type="DateTime" IncludeTimeValue="True">
    <Today/>
    </Value>
    </Gt>
    <Gt>
    <FieldRef Name="TimeOver"/>
    <Value Type="DateTime" IncludeTimeValue="True">
    <Today/>
    </Value>
    </Gt>
    </Or>
    </Where>
    </Query>Also check thishttp://office.microsoft.com/en-in/sharepoint-server-help/create-list-relationships-by-using-unique-and-lookup-columns-HA101729901.aspx

  • Using Javascript to show/unshow a field based on input in another field

    I want to display/not display a field in a JSP depending on what is selected in another field.
    I am using <div></div> element currently which is displayed/not displayed using a Javascript invoked by the first field.
    the problem with div is that I have to put it inside a <tr><td> otherwise it doesn't work. This makes the field look aloof from the rest of the page, and is also not aligned with the other fields.
    Is there anything other than <div> that can be used? or is there a way to correct the look of the field inside a div?
    Thanks

    You shouldn't have to put it inside a <tr><td> to get it to work. I've done what you are trying to do with <span></span> and it worked fine. I haven't tried it with a <div> but I can't image why that wouldn't work. Maybe you could post your code.

  • Not showing all comments posted for my blog.

    Hi exports,
    I created one blog for my team communication.
    I am posting articles in that.
    After commented, all posts are not appearing.
    May i know where shoud i check and fix this issue.
    Regards,
    Dhayanand Kalimidi

    Hi
    please check user's rights.
    and if you configured the blog for approval ( advanced settings )
    Romeo Donca, Orange Romania (MCSE, MCITP, CCNA) Please Mark As Answer if my post solves your problem or Vote As Helpful if the post has been helpful for you.

  • Listing Document Libraries using JavaScript

    Is it possible to use JavaScript to list all document libraries of a site? I would like to create a page that lists all document libraries (where the document library's name meets certain criteria).
    Johan Raeymaeckers

    You can use the Object Model to do this.  MS have authored an article that explains it better than I can here.  It has quite a few interesting other tricks too.
    http://msdn.microsoft.com/en-us/library/hh185009
    Steven Andrews
    SharePoint Business Analyst: LiveNation Entertainment
    Blog: baron72.wordpress.com
    Twitter: Follow @backpackerd00d
    My Wiki Articles:
    CodePlex Corner Series
    Please remember to mark your question as "answered" if this solves (or helps) your problem.

  • How to call a url using javascript

    Hi friends
    Iam a newbie i have a requirement
    i have to call some n number of URL using javascript i have all my url in one table .... i have to call all the url from that table ... and the output of the url should be saved in a flat file...The output of the url is in XML format... can any one please suggest me in doing my task ... and one more thing in which tool can i run the javascript coding...please give me ur suggestion and idea how it can be done ....
    My URL for example ll be like this as shown below wen i run this url it ll give me an XML format output
    HTTP://www.myserver.com/ev_api.action?user_id=<username>l&password=<password>&statevar=history&cutoff=<date>&id=<id>
    Thanks in advance
    Thiliban

    thilib wrote:
    In this OTN is there is javascript forum can please give me the link for it
    Thanks
    thilibJust to rephrase Walter's reply: there is no javascript forum in OTN!

  • Use Javascript to select artwork on a particular artboard?

    Is there a way to use Javascript to select all artwork on a particular artboard?
    Or if you couldn't designate the selection based on the artboard index, another way i could see doing it would be to select all artwork within a bounding box? For example if i were to measure the artboardRect of an artboard and then set the selection to all pageItems within that bounding box?
    Thanks in advance!

    awesome. i'll keep that one for my records. for my purposes right now, the selection by active artboard function is perfect. now i just need to work out how to loop through each pathItem within that selection and determine if it contains a certain spot color (and if it does, add to a counter of some sort) and verify that the number of occurrences of that spot color equal the total number of arboards in the doc (that is to say.. verify that a certain spot color exists at least once on every artboard).
    so i assure you i'll be back to soak up as much of your experience and knowledge as i can get my grubby paws on. =)
    Thanks again, so much. you've been incredibly helpful. CarlosCanto as well.

  • How to correctly use Hide All/Show All in RH HTML review?

    When using the Hide All or Show All filter options seen in RH HTML's Review Pane it states that all "comments and changes are hidden or seen in Review Pane as well as in Design Editor."  I cannot see any change when I look at the inserted or deleted items in the Design View.  Am I missing something?  I am trying to find a way to show all changes as "final' like Word 2010 does by using "Final" before we accept/reject these changes.  It appears that "View Selected Item" of the active topic may work the same way as I am hoping and shows all changes as if they were already accepted. Am I correct?
    I haven't heard from anyone in the forum so I wonder if I wasn't clear enough?  I am just trying to find out how you can view track changes seen inside a project's topics as if they were accepted, without having actually accepted them yet.  I see that when I select the "View Selected Item" button I see everything, whether it inserted or deleted.  Is that the only way to get a feel of what the final topic would 'look' like?

    Resolved using the Conditions on the workbook.

  • Javascript alert when showing all rows of a huge table ( 2000 rows)

    i've got this problem. I need to show all the rows of a table, i'm using ADF 10.1.3.4.
    What have i done so far?first of all i created a command link
    <af:commandLink shortDesc="Mostra Tutto" id="showAll"
    disabled="#{bindings.findAllVwEntePrmzRefrIter.estimatedRowCount == 0}"
    action="#{backing_editReferenza.onShowAll}"
    />
    In the backing bean i set the rangeSize of the table to -1
    public String onShowAll() {
    Object objShowAll = getSession().getAttribute("showAll");
    FacesContext fc = FacesContext.getCurrentInstance();
    ValueBinding vb = fc.getApplication().createValueBinding("#{bindings.findAllVwEntePrmzRefrIter}");
    DCIteratorBinding dc = (DCIteratorBinding)vb.getValue(fc);
    int oldRangeSize = dc.getRangeSize();
    dc.setRangeSize(-1);
    int rangeSize = dc.getAllRowsInRange().length;
    dc.setRangeSize(oldRangeSize);
    if ("Y".equals(objShowAll)) {
    getSession().removeAttribute("showAll");
    Integer oldRange =
    (Integer)getSession().getAttribute("oldRangeSize");
    getSession().removeAttribute("oldRangeSize");
    getTable1().setRows(oldRange);
    } else {
    getSession().setAttribute("showAll", "Y");
    getSession().setAttribute("oldRangeSize", oldRangeSize);
    getTable1().setRows(rangeSize);
    return "";
    // AdfFacesContext.getCurrentInstance().addPartialTarget(getTable1());
    Everything runs smoothly, but i have a problem if the table has lots of rows: i get a javascript warning that a script has been running for too long. (The alert goes: "Stop the execution of the script?" the usual javascript alert you get when a script runs for too long)
    What i want to achievt is that, if the table contains a lot of rows, the page takes a lot of time to load, but with no javascript involved (it's just a normal slow page).
    It seems that in some way the rows of the table are fetched by javascript and since the call is synchronous, it trigger the alert.
    This is how i declared the method iterator
    <methodIterator id="findAllVwEntePrmzRefrIter"
    Binds="findAllVwEntePrmzRefr.result"
    DataControl="FePrmzSLESSEJBLocal" RangeSize="10"
    BeanClass="it.ws.sma.prmz.ejb.model.VwEntePrmzRefr"
    Refresh="deferred"
    />
    and this is how i declared the table
    <af:table value="#{bindings.findAllVwEntePrmzRefr1.collectionModel}"
    var="row" styleClass="tableRefr #{backing_editReferenza.tableReferenzeStyleClass}"
    rows="#{bindings.findAllVwEntePrmzRefr1.rangeSize}"
    first="#{bindings.findAllVwEntePrmzRefr1.rangeStart}"
    emptyText="#{bindings.findAllVwEntePrmzRefr1.viewable ? 'Nessuna referenza trovata' : 'Accesso negato'}"
    binding="#{backing_editReferenza.table1}" id="table1"
    banding="row" bandingInterval="1"
    partialTriggers="btnEliminaRefr btnSvuotaPromo btnRemove btnAdd insVeloce">
    has anyone an idea onwhat could i do to have the table load all the rows from the server but withouth the alert?

    Sorry i haven't explain it well...
    the app is used to replicate entire databases, or agrupations of tables, from one database to another and it will have to be vendor independent... I'm trying with DB2, Oracle and MySQL. Later i will test it with more.
    Then I couldn't use vendor dependent SQL neither configuration parameters. Also I prefer to make the import logging the actions: for restoring purposes; maybe the user will have the option but defaults to the ohter.
    I'm thinking about some "strange" query SQL Stardard, like delete from table where (select .... using some kind of counter....

Maybe you are looking for