More Than HTML:
Fixed Background - IE only
Thank you Scott.
<body background="bground.gif" bgproperties="fixed">
Cross.The "onmouseover" and "onmosueout" commands are the most commonly used enhancement for links. Although both NS and IE recongnize the commands, some values are not. Confusing, I know. But bare with me.
Put customized text in the status bar at the bottom of the window.
<a href="page.html" onmouseover="window.status='Your text here';return true" onmouseout="window.status=' ';return true">Your link</a>
Notice in the onmouseout command there is a space between the single quotes. This is so the text in the status bar will disappear when the mouse is removed from the link. If you want the text to remain in the status bar, omit the onmouseout command.
You will need two images in your directory. One for the normal image and one for the image that will be displayed when the mouse is passed over the link.
<a href="page.html" onmouseover="document.iname.src='image-on.gif'" onmouseout="document.iname.src='image-off.gif'">
It is important to "name" your image EG. <img src="image-off.gif" name="iname">. This is to let the browser know which image is being changed.
This will change the color of the link without the use of images.
<a href="page.htm" onmouseover="this.style.color='red'" onmouseout="this.style.color='blue'">Your Link</a>
With one click windows will open and alert and confirmations will pop up! Here's how to do it:
Opens a new window when a link is clicked.
<a href="page.htm" onClick="winodw.open('pageforwindow.htm','newwin','height=?,width=?')">The link</a>
Take a look at the code, the "page.htm" should be the current page, the "pageforwindow" should be the page you want to open in the new window, 'newwin' is the name of the new window, and 'height=?,width=?' is the height and width of the new window. Notice that there are no spaces in the height and width specification, do not put spaces when configuring the window. Other attributes of the window are:
Buttons can be made with the <form> command and the onClick to give the button an action.
Take a look at the code. The input type makes the actual button, the value is the text displayed on the button the onClick activates the alert box and the 'Hello World' is the text that will be displayed in the alert box. Pretty simple huh?
As you can see there is not much difference in the actions of the alert and confirm box except for the confirm has an "OK" and "Cancel" buttons. Well, without another script, the actions are exactly the same. Here is a small script to help the confirm button work properly.
The script will go in the head of the page and the onClick command in the above code will change to:
Give your visitors a choise of either entering your site or not.
You can also use the onClick command with the <a href> command:
More to come...