Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Make my site your home page

Status
Not open for further replies.

rekclaw

Programmer
Jun 27, 2000
47
0
0
US
Where can I get the code to give our members the option to make our church's website their home page?
 
You can use JavaScript to achieve this. Here is a simple page...
Code:
<html>

<head>
<script type=&quot;text/javascript&quot;>
function makeDefault(element)
{
element.style.behavior='url(#default#homepage)'; 
element.setHomePage('[URL unfurl="true"]http://www.MYWEBSITE.com');[/URL]
}

</script>
</head>
<body>

<p>Click the button and MYWEBSITE will become your default home page.</p>

<form>
<input type=&quot;button&quot;  
onclick=&quot;makeDefault(this)&quot; 
value=&quot;Make MYWEBSITE your default homepage&quot;>
</form>

</body>
</html>
There are a couple of ways of achieving the same result - this is arguably the easiest. Please note that this feature will only work on Internet Explorer.

Good luck,
Craig
 
I pasted this in my webpage (in FP) and it doesn't work. What am I doing wrong? It shows up on the webpage as HTML. Do I need to publish it for it to work? Thanks for your help.
 
Hi there

It sounds like you have pasted the code into FrontPage's NORMAL mode. In FP switch to View Page and click on the HTML tab down the bottom left of the screen. That will then take you into the actual HTML of the page.

One thing to watch however is that when you do a copy/paste into FP the code can be a little screwy, patricularly with the < > symbols. Try copying and pasting into Notepad first then into FP.

Trust me the code does work! [pipe] but only in IE.

Hope you get on ok.

Craig
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top