Hi joe
I had same problem while ago; here is a solution in my code:
************** XUL Part
*<popup id="placesContext">*
<menuitem id="placesContext_PhOpenSecure"
class="menuitem-iconic menu-iconic PH-Cn-curTab"
*oncommand="bookMarksContext(1)"*
label="&InBasic.Ph.Main.Context.lbl1;"
insertbefore="placesContext_openSeparator"
selectiontype="single"
selection="bookmark"
forcehideselection="livemarkChild|livemark/feedURI|PlacesOrganizer/OrganizerQuery"
/>
************ JS Part
function bookMarksContext(index){
* var bmsvc = Components.classes['@
mozilla.org/browser/nav-bookmarks-service;1']
.getService(Components.interfaces.nsINavBookmarksService);
var
nodeItemId=PlacesUtils.getConcreteItemId(document.popupNode.node);
var nodeURI=bmsvc.getBookmarkURI(nodeItemId).spec; *
if(index==1)
OpenSecure(nodeURI);
else
OpenSecureNewTab(nodeURI);
}
----------
P.S: All necessarily parts are highlighted
P.S: you must use *getBookmarkURI *to get URI of bookmarks node
ref: http://developer.mozilla.org/en/docs/nsINavBookmarksService
enjoy ;)
InBasic
On Fri, Jun 13, 2008 at 13:49, Onno Ekker <[EMAIL PROTECTED]> wrote:
>
>
> On Fri, Jun 13, 2008 at 12:13 PM, joe ertaba <[EMAIL PROTECTED]> wrote:
>
>> alert(PlacesUtils.nodeIsBookmark(document.popupNode.node));
>>
>> answer is *true*
>>
>> so document.popupNode.node is a bookmakrs uri
>>
>> alert( document.popupNode.node.spec );
>>
>> undefined !
>>
>> I don't know why a URI doesn't have spac ; any idea ?
>
>
> I have no idea, but I'd use DOM Inspector to look up the node, find its
> type and see what childs and attributes it has. Besides looking at the docs,
> that is...
>
> Onno
>
>
> _______________________________________________
> Project_owners mailing list
> [email protected]
> https://www.mozdev.org/mailman/listinfo/project_owners
>
>
_______________________________________________
Project_owners mailing list
[email protected]
https://www.mozdev.org/mailman/listinfo/project_owners