SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Zealot zeeshan's Avatar
    Join Date
    Mar 2001
    Posts
    123
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi -

    I want to provide a link to a user so that upon clicking it they are able to bookmark the page. HOWEVER, I want to provide the URL to be bookmarked and not justthe default URL through Cntrl-D or or Cntrl-B or whatever.

    Thanks!

  2. #2
    Bimbo With A Brain! silver trophy Saz's Avatar
    Join Date
    Mar 2001
    Location
    Kent, United Kingdom
    Posts
    5,275
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is what I use..........

    <SCRIPT LANGUAGE="JavaScript">

    <!-- Begin
    if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {

    var url="http://www.your_website.com";
    var title="Your Website Title";

    document.write('<A HREF="javascript:window.ext');
    document.write('ernal.AddFavorite(url,title);" ');
    document.write('onMouseOver=" window.status=');
    document.write("'Click here to add this website to your favourites'; return true ");
    document.write('"onMouseOut=" window.status=');
    document.write("' '; return true ");
    document.write('">Click here to add this website to your favourites</a>');
    }
    else {
    var msg = "Click here to add this website to your favourites";
    if(navigator.appName == "Netscape") msg += " (CTRL-D)";
    document.write(msg);
    }

    // End -->
    </script>

    If you want to see it in use, go to http://www.postfive.com


    Hope this is what you're looking for.
    Saz: Naturally Blonde, Naturally Dizzy!
    No longer Editor of the Community Crier.

    Don't mind me, I'm having a BLONDE moment!

  3. #3
    SitePoint Zealot LunaC's Avatar
    Join Date
    Feb 2001
    Posts
    176
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've often wondered why in so many JavaScripts the document write lines are split up. Wouldn't it be easier just to have it all in one long line, or is there a reason for this?

    Great script BTW, its even better than the one I'm using right now. I'm changing to yours, thanks for posting it

  4. #4
    SitePoint Zealot zeeshan's Avatar
    Join Date
    Mar 2001
    Posts
    123
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello Saz -

    Yes, the script you posted seems like just the thing I was looking for - will try it later tonight.

    Okay here's another question: Do you know how one would go about providing a link to make a page a user's default, homepage? Obviously I would like a confirmation dialog box alerting them of this before thehomepage is changed.

    Any ideas...anyone?

    Thanks again!


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
  •