View Full Version : Determinining a user's homepage?

06-19-2002, 03:41 PM
Can you determine the value of a user's homepage?

06-19-2002, 04:06 PM
You mean, can you determine what page the visitor has as their homepage??

06-19-2002, 04:26 PM
if you are looking how to set the users homepage this is a text link that sets it (if someone could tell me how to change that for when the page loads that would be great :D)

<SPAN onClick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.wsabstract.com');">Click here to make wsabstract ur home page</SPAN>

06-19-2002, 04:53 PM
Originally posted by whackaxe
(if someone could tell me how to change that for when the page loads that would be great :D)

how about this...

<body onLoad="setHomePage('http://www.wsabstract.com');">


06-19-2002, 05:26 PM
Sorry for not offering a prompt reply..thanks for the suggestions on setting the page..

I want to be able to validate whether or not a user has the correct homepage set incase the page is the same but the URL is different...

06-19-2002, 08:22 PM
To my knowledge, you cannot read what the user's homepage is, unless they are using IE and you use ActiveX and search through their registry, but they'll (hopefully) get big scary alerts saying why they shouldn't allow the script to run.

You can redirect them to their homepage though:

if (!window.home) window.home = function() { location.href = 'about:home' };


06-19-2002, 08:36 PM
sorry, my post didn't apply to the original comment, I was replying to whackaxe's post - but even then, the method I gave was wrong :D


06-19-2002, 09:32 PM
Thanks to all!
I will try to do the registry snoop as it would be in a trusted evironment or an HTA...

06-19-2002, 10:05 PM
is there a shorter way that the way i just showed for setting the homepage. save a couple of lines of code :D

06-19-2002, 11:01 PM
You could try somethign like this for onload:

<body onload="hp.style.behavior='url(#default#homepage)';hp.setHomePage('http://www.uvsc.edu');">
<span id="hp"></span>

although it is highly annoying!