Scripts 4-5: Fun with the status bar.
To view the next couple of scripts, you have to look at the status bar at the bottom of the window. You should see the text: "This is the status bar".


Script 4: the DEFAULT message

This script is a very simple one. It allows you to add a default message (a message that will always appear) to the status bar. The code used for this page is:

Put this code right after the <BODY> Tag:

<SCRIPT>defaultStatus="This is the status bar"</SCRIPT> The text in white can be changed for anything you want.

DOWNLOAD THE SCRIPT CODE IN .TXT format


Script 5: Message with links

Move your mouse over the following link:

PAGE 2

As you might of noticed, a message was displayed in the status bar instead of the usual "http://www.etc...". The script used for this link was:

<A HREF="JavaScripts2P2.html" onmouseover="window.status='Surprise! A message instead of the link address!'; return true">PAGE 2</A>

Indeed, you are adding extra HTML code to the link tag (<A HREF="">. The «onmouseover="» command tells the window's status bar to display the white text instead of the page's http address.

The page (link to) and the message can be changed to what ever you might want.

DOWNLOAD THE SCRIPT CODE IN .TXT format


Script 6

Click on the following link:

PAGE 2

Watch the alert message that comes on when you click the link. Your only choice will be to click on the OK button. The script code used for this link was:

<A HREF="JavaScripts2P2.html" onclick="alert('You will soon be entering Page 2! Cool, eh?.')">PAGE 2</A>

The page (link to) and the message can be changed to what ever you might want.

DOWNLOAD THE SCRIPT CODE IN .TXT format


Script 7: Confirmation On Click

Once again, click on the follwing link:

PAGE 2

Watch the confirmation that comes on when you click the link. It asks you to make sure that you want to go to page 2. You can either click an OK or Cancel button. If you click OK, you will then see the same message presented in the previous example. If you click Cancel, you will see another message and come back here. Note: I know that this script doesn't quite work right. Even if you press Cancel, you will still go to the page. I'm working on it.

Here is the code for this script:

<A HREF="JavaScripts2P2.html" onclick="if(confirm('Are you sure you want to go to page 2?')) alert('Here we go! (Of course, you can remove this second alert, or write what ever you like in it. -Anatole'); else (alert('Well too bad! You are going anyways!.'))">PAGE 2</A>

The page (link to) and the message can be changed to what ever you might want.

DOWNLOAD THE SCRIPT CODE IN .TXT format


Click HERE to return to the JavaScript page
Click HERE to return to the AnatoleNET Home Page
This page is hosted by GEOCITIES