webdev1
07-31-2003, 12:09 PM
Ok guys and gals, heres a challenge. I want to set my page to a users homepage, but I don't want them to click a button or a link. I want it to happen onload of the body. We're changing the name of our site and want to automatically set it. I've tried two different things, both of which i'll include here and neither are working! Can someone help me out! THANKS!!
<html>
<head>
<style type="text/css">
<!--
@media all
{
IE\:HOMEPAGE {behavior:url(#default#homepage)}
}
//-->
</style>
<script language="javascript">
<!--
function fnSet()
{
oHomePage.setHomePage('http://dlconnect.dqe.com/');
event.returnValue = false;
}
//-->
</script>
</head>
<BODY onload="fnSet();" >
<!--[if IE 5]>
<IE:HOMEPAGE ID="oHomePage" />
<input type="button" value="Make NetSpade your homepage!" onclick="fnSet()" />
<![endif]-->
</body>
</html>
I also tried to use CFIFs rather than that <!--[if IE 5...
Here is the other way I tried it:
<body onload="javascript:history.go(0).style.behavior=\'url(#default#homepage)\';javascript:history.go(0).setHomeP age(\'http://www.YourWebSiteHere.com\');">
<html>
<head>
<style type="text/css">
<!--
@media all
{
IE\:HOMEPAGE {behavior:url(#default#homepage)}
}
//-->
</style>
<script language="javascript">
<!--
function fnSet()
{
oHomePage.setHomePage('http://dlconnect.dqe.com/');
event.returnValue = false;
}
//-->
</script>
</head>
<BODY onload="fnSet();" >
<!--[if IE 5]>
<IE:HOMEPAGE ID="oHomePage" />
<input type="button" value="Make NetSpade your homepage!" onclick="fnSet()" />
<![endif]-->
</body>
</html>
I also tried to use CFIFs rather than that <!--[if IE 5...
Here is the other way I tried it:
<body onload="javascript:history.go(0).style.behavior=\'url(#default#homepage)\';javascript:history.go(0).setHomeP age(\'http://www.YourWebSiteHere.com\');">