• Welcome to DNForum.com - Domain Investor Forum, Free Domain Marketplace and a community for 45+ domain pros
    If you are new to domains and looking to buy, sell and learn about domains then you have come to the right place. DNForum is the oldest global domain name community on the internet and continues to grow every day. There are over 45,000 domainers on DNForum doing everything from buying domains, selling domains, using our free in-house built tools, learning about domains and discussing domains. Take a minute and Register.

exitpop script

Status
Not open for further replies.
thanks for all your help guys.
Got a few options there.
I will give them all a go and see which suits best.

Sorry I wasn't more descriptive at the start.

Cheers
Dingo
 
Welcome, Dingo. If you're looking for a link on your page that once clicked asks to be your homepage, just look at Google's homepage code (towards the bottom). It doesn't get more simple than that. I use something similar on www.FreeWho.com.

Code:
<script>
if (!hp.isHomePage('http://www.freewho.com/'))
   {
     document.write("<br><a 
       href=\"http://www.freewho.com/index.php\" 
       onClick=\"style.behavior='url(#default#homepage)';
       setHomePage('http://www.freewho.com/');\">
       <b>Make FreeWho.com Your Homepage!</b></a>");
   }
</script>
This basically shows the link if you are using IE. If you aren't, it shows nothing. I think the code brn2h8's code does all the extra validation and puts up alternate directions for other browsers, but I'd skip the extra directions personally and make my page load a tad quicker... :)

~ Nexus
 
Sorry, I just tested the code, and it DOES require more. I oversimplified the scripting earlier for getting a "HomePage set?" request to happen as a function working in an "onunload" script.

Use the following code to do what you originally requested in your first message.

Code:
<html xmlns:ie>
<style>
@media all {
 IE\:HOMEPAGE{behavior:url(#default#homepage)}
}
</style>
<head>
<title>Default Home Page</title>
</head>
<body bgcolor=#ffffff text=#000000 
 onunload="oHomePage.setHomePage('http://www.example.com/');">
<ie:homepage id=oHomePage />

TEST TEST TEST

</body>
</html>
Note that you need to set the xml namespace in the <HTML> tag, as well as include an extra XML tag in your body.

Best Regards,
~ Nexus
 
Excellent!
Exactly what I wanted.
Thanks
 
Originally posted by izopod


Before you put a pop-under on your site, ask yourself this question: Do I like going to other sites where I'm asked if I want to alter my browser homepage selection??? My personal belief on pop-ups/unders is that they hurt more than help, unless you have a porn site where you'd almost expect them.

Either way, that was nice of brn2h8 to give you that script.

izopod

I agree completely izopod!
popups/under are bad business!

Cheers!
 
Originally posted by mudfence


I agree completely izopod!
popups/under are bad business!

Cheers!

Actually Mud I agree now too. It was exactly what I was looking for but after setting it up and trying it it even pi**ed me off so I ditched it. Still appreciate the help guys.

Dingo.
 
Heh, heh... ;)

~ Nexus
 
Status
Not open for further replies.
Back
Top Bottom