jnr123
asked on
Expand Current Bookmark Javascript
I want to create a form button that, when clicked, will expand a bookmark. Or, I want a bookmark to expand when navigating to a certain page.
I found this javascript somewhere else but it won't work.
tocbm = this.bookmarkRoot.children [0];
tocbm.execute;
Does anyone know if this is possible, thanks.
I found this javascript somewhere else but it won't work.
tocbm = this.bookmarkRoot.children
tocbm.execute;
Does anyone know if this is possible, thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The execute method can only be used to call a defined action. Because there is no action like opening a bookmark subtree, that method cannot be used for this purpose.
You can instead use the open attribute of bookmarkroot children objects:
this.bookmarkRoot.children
would open the subtree while ...open = 0 would close it.
Have fun
Maik