Results 1 to 7 of 7

Thread: Addbook

  1. #1
    Join Date
    Jan 2006
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Addbook

    I am using the script found at:
    http://www.dynamicdrive.com/dynamicindex9/addbook.htm
    And have some questions

    Question 1: Is there a way to make this script not load into the sidebar for Netscape/Firefox users?

    Question 2: Is there a way to make the script pull the url of the page it is on rather than have it hard coded in the code?

    Question 3: Is there a way to have the script pull the title of the page it is on rather than have it hard coded in the code?

    This script works great and is by far the best one I have seen.

    There is a script at http://www.jscode.com/js_auto_bookmark.shtml the does these things I ask fro, but it only works in IE. I need something that works in IE, Netscape and Firefox. Now, if that is not possible, I need an if/then statement I can use that will use the appropriate working code depending on the browser they are using.

    Ideas?
    Thanks in Advance.

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Question 1: Is there a way to make this script not load into the sidebar for Netscape/Firefox users?
    Alas, no.
    Question 2: Is there a way to make the script pull the url of the page it is on rather than have it hard coded in the code?
    Yes, you can get it with window.location.href.
    Question 3: Is there a way to have the script pull the title of the page it is on rather than have it hard coded in the code?
    Use window.document.title here.
    Final code:
    Code:
    <a href="javascript:bookmarksite(window.document.title, window.location.href);">Bookmark this page!</a>
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Jan 2006
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Twey
    Alas, no
    Ouch! Not the reply I had hope for. This is hard to believe tho. Are you saying that there is absolutly no way at all that a "Bookmark This Site" link in javascript can be created that does not load the bookmark in the sidebar? Is this outside the possiblity of javescript? That is difficult to swallow.

    Quote Originally Posted by Twey
    Final code:<a href="javascript:bookmarksite(window.document.title, window.location.href);">Bookmark this page!</a>
    Awesome! This was perfect. Thank you.

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Is this outside the possiblity of javescript? That is difficult to swallow.
    I agree, it's stupid. However, insofar as I know, there is no way to do it. I'm sure Mozilla will add this feature in at some point, though. The problem is that the method of bookmarking used for Mozilla-based browsers involves adding a sidebar.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Jan 2006
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hmm, well that sucks. Does this apply to netscape as well? Is there a modification to this code that will work in Netscape without using a sidebar?

  6. #6
    Join Date
    Jan 2006
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Well, I just posted a message at the Mozilla forums. Lets see what they have to say. I will keep you informed.

    Thanks for your help.

  7. #7
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Yes, Netscape is a Mozilla-based browser.
    Well, actually, Mozilla is a Netscape-based browser. But everyone has some embarrassing ancestors somewhere.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •