www.webdeveloper.com
Results 1 to 2 of 2

Thread: Need a little help with bookmark script (

  1. #1
    Join Date
    Nov 2002
    Posts
    4

    Need a little help with bookmark script (

    Hello people,

    Can somebody help me with this bookmark script?
    The script work just fine, but I'm running a intranet site and I want people in this building to be able to bookmark this site, wich is located at a server here.

    // this is the script

    <SCRIPT LANGUAGE="JavaScript">
    var txt = "Toev. aan favorieten";
    var url = "//Server\directory\sub-directory\index.html";
    var who = "Title";

    var ver = navigator.appName;
    var num = parseInt(navigator.appVersion);
    if ((ver == "Microsoft Internet Explorer")&&(num >= 4)) {
    document.write('<A HREF="javascript:window.external.AddFavorite(url,who);" ');
    document.write('onMouseOver=" window.status=');
    document.write("txt; return true ");
    document.write('"onMouseOut=" window.status=');
    document.write("' '; return true ");
    document.write('">'+ txt + '</a>');
    }else{
    txt += " (Ctrl+D)";
    document.write(txt);
    }
    </script>


    If I use var url like http://www.bla.com it works good!
    When I change the var url to:

    "//Server\directory\sub-directory\index.html
    or
    "file://Server\directory\sub-directory\index.html


    The script stops working with an unknown error

    Any help would be great

  2. #2
    Join Date
    Nov 2002
    Posts
    4

    Yes!

    Thank you very much, works like a charme

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles