What I'm really trying to do is search my bookmarks for a specific
title and open it. However, now having much experience, I wanted to
see if I could even create a bookmark. From this, my textarea has the
"test1" but not "test2". So I'm wondering what could be making create
() not work. Also, what does "parentid" refer to. From the
documentation, I wasn't sure if bookmarksbar must be initialized
elsewhere for me to access its ".id" property.
Also, I have the bookmarks permissions in my manifest.json file.
Any input would be appreciated.
Code below is a .html file that creates an icon in the bar.
<form name="myform">
<table border="0" cellspacing="0" cellpadding="5"><tr>
<td><textarea name="inputtext"></textarea></td>
<td><input type="button" value="Search" onClick="searchbook();"></p></
td>
</tr></table>
</form>
<script language="javascript" type="text/javascript">
function searchbook() {
//chrome.bookmarks.search("The Escapist");
document.myform.inputtext.value = "test1";
chrome.bookmarks.create({'parentId': bookmarksbar.id,
'title': 'Extensions doc',
'url': 'http://code.google.com/chrome/
extensions'});
document.myform.inputtext.value += "test2";
};
</script>
--
You received this message because you are subscribed to the Google Groups
"Chromium-extensions" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/chromium-extensions?hl=en.