Membership is FREE, giving all registered users unlimited access to every DNForum feature, resource, and tool! Optional membership upgrades unlock exclusive benefits like profile signatures with links, banner placements, appearances in the weekly newsletter, and much more - customized to your membership level!

exitpop script

Status
Not open for further replies.

Dingo

Level 5
Legacy Platinum Member
Joined
Dec 3, 2002
Messages
273
Reaction score
0
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
 

Nexus

DNF Addict
Legacy Exclusive Member
Joined
Sep 11, 2002
Messages
1,495
Reaction score
0
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
 

Nexus

DNF Addict
Legacy Exclusive Member
Joined
Sep 11, 2002
Messages
1,495
Reaction score
0
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
 

Dingo

Level 5
Legacy Platinum Member
Joined
Dec 3, 2002
Messages
273
Reaction score
0
Excellent!
Exactly what I wanted.
Thanks
 

NameCaster

Level 8
Legacy Gold Member
Joined
Jan 2, 2003
Messages
1,984
Reaction score
0
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!
 

Dingo

Level 5
Legacy Platinum Member
Joined
Dec 3, 2002
Messages
273
Reaction score
0
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.
 

Nexus

DNF Addict
Legacy Exclusive Member
Joined
Sep 11, 2002
Messages
1,495
Reaction score
0
Heh, heh... ;)

~ Nexus
 
Status
Not open for further replies.

Who has viewed this thread (Total: 1) View details

Who has watched this thread (Total: 4) View details

The Rule #1

Do not insult any other member. Be polite and do business. Thank you!

Members Online

Premium Members

Upcoming events

Our Mods' Businesses

*the exceptional businesses of our esteemed moderators

Top Bottom