Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Would u like 2 add me 2 favourites before you go?  (Read 3905 times)

0 Members and 1 Guest are viewing this topic.

PL2007

  • Guest
Would u like 2 add me 2 favourites before you go?
« on: January 13, 2007, 03:19:24 AM »
Hi,
Here is a completely new one on me, but I'm hoping someone can help me.

If a user clicks on the X (top right) to close or types a new address into the address bar etc. but is leaving the site completely in any case, is it possible for them to get a quick IE box asking if they would like to save the site to their favourites before they go. Then they get a yes/no option. If they click on yes the site should go straight to favourites and they can carry on going to wherever they were going.

Is that possible with HTML, PHP or whatever?
« Last Edit: January 13, 2007, 03:20:05 AM by PL2007 »

fffreak



    Adviser

  • That's right I am a final fantasy freak.
  • Thanked: 3
    • Yes
    • JSPCRepair
  • Certifications: List
  • Experience: Guru
  • OS: Windows 7
Re: Would u like 2 add me 2 favourites before you
« Reply #1 on: January 13, 2007, 09:16:10 PM »
Not that I know of, You see my thoughts toward that is complete laziness as it is right there in front of you all you have to do is click the favorites tab, and click add to favorites. You could try designing your own browser and put a command in there...onClose do add favorites(Not a real method in programming), and of course you will have alot of security issues. ;)
« Last Edit: January 13, 2007, 09:20:05 PM by fffreak »
Computers are the future, not us. Learn everything you can about them while you still can, soon they will be learning about us... Every bit of advice that I give you is best guess, it is your choice whether or not you listen to it.

Dilbert

  • Moderator


  • Egghead

  • Welcome to ComputerHope!
  • Thanked: 44
    Re: Would u like 2 add me 2 favourites before you
    « Reply #2 on: January 13, 2007, 09:43:25 PM »
    Another option is to have a JavaScript popup in the OnUnload() event of your site, which is an HTML page that asks with a Yes or No button. I must warn you, however, that your visitors will not love you for it, and it tends to scare away traffic.
    "The geek shall inherit the Earth."

    fffreak



      Adviser

    • That's right I am a final fantasy freak.
    • Thanked: 3
      • Yes
      • JSPCRepair
    • Certifications: List
    • Experience: Guru
    • OS: Windows 7
    Re: Would u like 2 add me 2 favourites before you
    « Reply #3 on: January 13, 2007, 09:57:19 PM »
    My mistake is he trying to make a website that does that? This would be your best bet. ;D Sorry for misunderstanding as you didn't say it was for one of your sites.
    Computers are the future, not us. Learn everything you can about them while you still can, soon they will be learning about us... Every bit of advice that I give you is best guess, it is your choice whether or not you listen to it.

    fffreak



      Adviser

    • That's right I am a final fantasy freak.
    • Thanked: 3
      • Yes
      • JSPCRepair
    • Certifications: List
    • Experience: Guru
    • OS: Windows 7
    Re: Would u like 2 add me 2 favourites before you
    « Reply #4 on: January 14, 2007, 12:23:36 AM »
    I have found your anser...How much will you pay me? JK LOL ;D.
    Here ya go...

    Quote
    (Your HTML code)
    <html>
    <head>
    <title>
    </title>
    </head>
    <body>
    <noscript>Please Enable Javascript</noscript>
    </body>
    </html>

    [highlight]<script language=Javascript>
    window.onunload = function(){
    var urlAddress = "http://www.yourdomain.com/bookmark.html";
    var pageName = "Your page name";
    var answer = confirm("Add to favorites before you go?")
          if (answer){
             window.external.AddFavorite(urlAddress,pageName)
          }
          else{
                alert("Bye.")
          }
    };
    </script>[/highlight]
    Put that below your HTML code.

    EDIT: One more thing about this script everytime the page is closing or your are visiting another page the alert will pop up, so it would be an annoyance.
    « Last Edit: January 14, 2007, 06:58:13 PM by fffreak »
    Computers are the future, not us. Learn everything you can about them while you still can, soon they will be learning about us... Every bit of advice that I give you is best guess, it is your choice whether or not you listen to it.

    Rob Pomeroy



      Prodigy

    • Systems Architect
    • Thanked: 124
      • Me
    • Experience: Expert
    • OS: Other
    Re: Would u like 2 add me 2 favourites before you
    « Reply #5 on: January 14, 2007, 10:20:56 AM »
    Browser support for this javascript is variable.  If a website did that to me, I would never visit it again.
    Only able to visit the forums sporadically, sorry.

    Geek & Dummy - honest news, reviews and howtos

    fffreak



      Adviser

    • That's right I am a final fantasy freak.
    • Thanked: 3
      • Yes
      • JSPCRepair
    • Certifications: List
    • Experience: Guru
    • OS: Windows 7
    Re: Would u like 2 add me 2 favourites before you
    « Reply #6 on: January 14, 2007, 06:55:19 PM »
    I know I thought I would just throw that in there though, because he may have other scripts that he may also want to run.
    Computers are the future, not us. Learn everything you can about them while you still can, soon they will be learning about us... Every bit of advice that I give you is best guess, it is your choice whether or not you listen to it.