Capt-Z

Capt-Z Home
Multimedia
Photoshop
Bryce
Banners and Headers
Photography
Tutorials
Free Downloads
Links
Stuff
Contact Capt-Z.com
Capt-Z/Nita

Unbelivably Smooth

Graphics-Portal
Dynamic-Drive
Ozone


Visitor Information
Click here for
Browser Info


Today's Date:

Current Time:

Google Advertising









Photoshop

Make this your home page.
So you want to know how they do the "make this your home page" thing?
You can now use one short line of DHTML to set your page as the home page for your users. Look at the top of your browser. See the button that reads "HOME"? By using this script you'll be able to set it so that when the user clicks on that button, he or she will come to your page.

The Code
I'll show you how it's done, but first a word of warning. Only offer this as something the user can click on to enact. It's possible to set this script so that it executes as soon as someone logs on to your page, Don't do that. For one thing, the process doesn't happen automatically. A little box pops up once the script runs, asking if the user really wants your page set to be the home page. And second, it's very annoying

That said, let's get down to code. Here it is:
<SPAN STYLE="cursor:hand; color:blue; text-decoration:underline" onClick="this.style.behavior='url(#default#homepage)'; this.setHomePage('http://www.place url here.com');">Click Here To Make This Your Home Page </SPAN>

And here's how it looks.

Click Here to Make This Your Home Page

When the box pops up, choose yes, then click on your "Home" button to prove that the system works. You can always change it back to whatever you had before by choosing Tools --> Internet Options --> and then changing your home page address at the top of that new window.


Here's how to do it with a button instead of text.
<FORM> <INPUT TYPE="button" VALUE="Click Here To Make This Your Home Page" onClick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.place url here.com');"> </FORM>

Here's how it looks.


The code is fairly simple. To use it on your page, you really only need to make two changes:
  1. Change the URL "http://www.place url here.com" to your page.
  2. Change the text of the phrase "Click Here To Make This Your Home Page" to be appropriate to your page.
Other than that, just try to make sure you get the entire code onto one line or you'll get some nasty errors. Anywayz, that's it, and that's that. Check back for more lessons soon, and watch out, you may just learn something.

Rich (a.k.a. Capt-Z)
Capt-Z


Graphics-Portal

Picture of the Month Freedom
click on image for full screen view.
Free Animation Free Animation
Free Wallpaper Free-Wallpaper ~High-Res files~
These may take awhile!
Free-Wallpaper
Capt-Z Links Use these images to link to me. Capt-Z
Capt-Z
Capt-Z
Simply right click and hit "save as" then place the link on your site.

Advertisment