HomePrivacy Policy  | Terms Of UseContact Us |

 

 

Online Business L(a)unch™Setting Up a Website: Build Your Website > Webmaster Tools

html and JavaScript tricks

Here's some of commonly-used HTML and JavaScript tricks. You can copy-and-paste the text; just be sure replace the text in blue with your own URL, file or text. And don't forget to test!

 

Open a Link in a New Window

This feature allows your visitor to visit another website without actually "leaving" yours.

Use the TARGET parameter in your A HREF tag.

<A TARGET="_blank" HREF="http://www.your-destination-URL.com/" >


 

specific word in e-mail subject line or body


If you want your visitor to enter a specific word or phrase into the subject line or the body of an email, you can use the following:


Prefill subject line:

<A HREF="mailto:your-name@your-domain.com?Subject=Your Subject">Text to display</A>


Prefill the body:

<A HREF="mailto:your-name@your-domain.com?Body=Your Message">Text to display</A>



Automatically Redirect Your Visitor to Another URL


A redirection page (or “fast META refresh”) will automatically redirect the visitor to any URL or webpage you specify.

Using redirection page you can prevent people from ‘peeking’ into your directories. For example, if you have directory called "Books", when somebody types into browser: www.your-site-name.com/Books, he gets the complete list of all files you have in this directory. This is something you don't want, right?

Just create index.html file that redirects people back to your homepage or whatever page you want: put META refresh tag into the HEAD of  HTML, and upload this page to every directory you have. Now if somebody types www.your-site-name.com/Books, he gets the page you specified. As simple as that.

Sometimes you have to rename the page, or move it into different location (directory). Since other websites may still have link to your old page, or your visitors may have it  bookmarked, you definitely want to redirect them to your new page with correct name.

One of the solutions is to put this 'meta refresh tag' into your old page's HTML. This way your visitor will automatically be redirected to the new page, and you will not lose any of the traffic.

Place the following META tag between the HEAD tags of your page's HTML: 

<META HTTP-EQUIV="Refresh" CONTENT="0;  URL=http://www.your-site-name.com/correct-page-name.htm"><TITLE></TITLE>

Another solution is creating custom error pages; we'll talk about it next time.

Check for updates: more tips and tricks will be available soon!

 

 
  Yohana Saint Etienne © 2005 | All Rights Reserved | Contact