Website Design Tips: HTML, JavaScript codes, tips, tricks and techniques


Web Source Web Design Tips
by Shelley Lowery

Back to Previous Page With A Button or Link

Button:

<form>
<input type="button" value="Back to Previous Page"
onClick="javascript: history.go(-1)">
</form>

Link:

<a href="javascript: history.go(-1)">Back</a>

Place either code where you would like the button or link
to appear.

Tip provided by: Web Source: Your Guide to Professional
Web Design and Development. http://www.web-source.net

----------------------------------------------------------------------

Web Source Web Design Tips
by Shelley Lowery

Button Email Prompt

<form>
<input type="button" value="Email Me"
onClick="location.href='mailto:you@yourdomain.com'">
</form>

This code will create a button that when clicked on, will
launch the users email program. You can change the value
words to whatever you'd like your button to say.

Tip provided by: Web Source: Your Guide to Professional
Web Design and Development. http://www.web-source.net

----------------------------------------------------------------------

Web Source Web Design Tips
by Shelley Lowery

On MouseOver Alert Box

<a href="" onMouseOver="alert('YOUR MESSAGE');return true;">
Place link text here</a>

This code will open an alert box when your mouse moves
over the link. This alert box will make a sound and display
a small box with your message and an "OK" button. The box
will close when the "OK" button is clicked.

This alert can be used to inform your visitors of a special
event, news, or information.

Tip provided by: Web Source: Your Guide to Professional
Web Design and Development. http://www.web-source.net

----------------------------------------------------------------------

Web Source Web Design Tips
by Shelley Lowery

Prevent Your Site From Being Framed

Add this code inside your <body> tag.

<body onLoad="if (self != top) top.location = self.location">

By adding this code to your body tag, you will ensure your
web site won't be framed. If your link is included within
a frameset, when clicked on, it will open in a new window.

Tip provided by: Web Source: Your Guide to Professional
Web Design and Development. http://www.web-source.net

----------------------------------------------------------------------

Web Source Web Design Tips
by Shelley Lowery

Creating A Download Link

If you have access to ftp, you can create a download link
like this:

<A HREF="ftp://yourdomain.com/yourfile.zip">

If you don't have access to ftp, you can create a download
link like this:

Instruct your visitors to hold the "shift" key down while
they click on the download link.

<A HREF="http://yourdomain.com/yourfile.zip">

Tip provided by: Web Source: Your Guide to Professional
Web Design and Development. http://www.web-source.net