CODE TIPS

Copy this coding <Ctrl+C> and Paste into your editor <Ctrl+V>

Display another Web Page Automatically
Display a Pop-up window
Display an Alert Message
Create an Image Rollover

Display another Web Page

In HTML code window directly under the <TITLE> tag insert this code to automatically display a different web page:

<META HTTP-EQUIV="Refresh" CONTENT="10; URL=http://www.newpage.com">

Description of code: The main area of the code that you will need to edit is the CONTENT="10.  This section of code is used to determine how long to wait before displaying the new web page (in seconds).


Display a Pop-up window

Directly to the left of the <BODY tag type:

ONLOAD="javascript:window.open('sales.html','sale','HEIGHT=250, WIDTH=250')">

Description:  This code will display the page sales.html with a height and width of 250.


Display an Alert message

Enter this code into the body of your HTML page

<SCRIPT TYPE="text/javascript:>
alert("Congratulations to this week\'s winner)
</SCRIPT>

Description: This code will display an alert window with an OK button.  NOTE any words that has an apostrophe in it must have the \ in order for the correct word to appear.  Example week\'s will display week's.


Create an Image Rollover

This is sample coding from my main page

<a href="http://"><img src="CODETIP.gif"
alt="TIPS AND TRICKS" width="150" height="70"
onmouseover="codebutton.src='CODETIP2.gif'"
onmouseout="codebutton.src='CODETIP.gif'"
name="codebutton"></a></td>

Description: The main thing to do is to assign a name to the graphic.  In the onmouseover and onmouseout code you use the name of the graphic plus you add .src and choose the graphic you would like to display in either situation.

To view any coding used in a web page.  From the View menu in your explorer select Source.

If you have any other coding for HTML I am always interested in learning new tips.
Please email me the coding.

 

 

 

 

 

 

1
Hosted by www.Geocities.ws

1