Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Regular Coder
    Join Date
    Jul 2002
    Location
    51° 03' -78" N -114° 05' 72" W
    Posts
    617
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Trouble with adding bookmark!

    Ok I am having trouble with the following code if the main page is loaded it works fine but if you goto a another page within the site and click the bookmark button it doesnt work?

    Code:
    <td width="33%"><a href="javascript:if(ie){window.external.AddFavorite(http://www.website.com/Page.asp','<%response.write RS.fields("FNameField") & " "&Flink&" Page"%>')}else{}" title="Click here to bookmark" onClick="Bookmark()" style="text-decoration: none" onMouseOver="window.status='Click here to Bookmark Page'; return true" onMouseOut="window.status=''; return true"><font color="#000000"><%response.write RS.fields("FNameField") & " "&Flink&" Page"%></font></A></td>
    How can I make this work on all pages?
    Last edited by Crash1hd; 09-27-2003 at 11:44 AM.

  • #2
    Master Coder
    Join Date
    Feb 2003
    Location
    Umeå, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    Hmm, it might be the length of the bookmark. Did you know ie6w has a limit at about 530 characters?
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

  • #3
    me'
    me' is offline
    Senior Coder
    Join Date
    Nov 2002
    Location
    Warwickshire, England
    Posts
    1,229
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You may also need to escape the quotes halfway through the bookmark.

    ie:

    "AddFavourite('blahblah\"blahblah')"

    If you have quotes halfway through the bookmark.
    David House - Perfect is achieved, not when there is nothing left to add, but when there is nothing left to take away. (Antoine de St. Exupery).
    W3Schools | XHTML Validator | CSS Validator | Colours | Typography | HTML&CSS FAQ | Go get Mozilla Now | I blog!

  • #4
    Regular Coder
    Join Date
    Jul 2002
    Location
    51° 03' -78" N -114° 05' 72" W
    Posts
    617
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I think I figured out where the problem is the page that its trying to save is not the same as the page it is on! I have to try it when I get home
    Last edited by Crash1hd; 09-27-2003 at 11:43 AM.

  • #5
    Regular Coder
    Join Date
    Jul 2002
    Location
    51° 03' -78" N -114° 05' 72" W
    Posts
    617
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ok I was wondering is there a way to get the URL of the page that you are on! Useing ASP so for example of the url is www.website.com then it would show that and if the url is www.website.com/here/ it would show that?

  • #6
    me'
    me' is offline
    Senior Coder
    Join Date
    Nov 2002
    Location
    Warwickshire, England
    Posts
    1,229
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I believe window.location does this, you don't need ASP.
    David House - Perfect is achieved, not when there is nothing left to add, but when there is nothing left to take away. (Antoine de St. Exupery).
    W3Schools | XHTML Validator | CSS Validator | Colours | Typography | HTML&CSS FAQ | Go get Mozilla Now | I blog!


  •  

    Posting Permissions

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