Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 85594

How to rename bookmarks

$
0
0

I'm simply trying to rename a bookmark via javascript, and keep running into the notallowederror: security settings... Previously, when I ran into this problem, I could avoid it by certifying the document, which would allow the javascript to run as privileged.  However, renaming bookmarks is apparently quite a sinister activity, and needs extra security??  I made folder level scripts:

var renameBook = app.trustedFunction(

  function(thisPage)

  {

  app.beginPriv();

  var books = this.bookmarkRoot.children;

  for (var i = 0; i < books.length; i++) {

  var vNotes;

  if (books[i].name == "Visit Notes") {

  vNotes = books[i].children;

  for (var j = 0; j < vNotes.length; j++) {

  if (vNotes[j].name == thisPage)

  vNotes[j].name = vNotes[j].name + "-signed: " + new Date();

  }

  }

  }

  app.endPriv();

  }

);

and call that from my document-level script, but I get the same problem...  what am I doing wrong?


Viewing all articles
Browse latest Browse all 85594

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>