There's two ways to do alert windows. You can set up a function in the head of the document and call it up later. This is especially good for multi-line alerts as shown below. Notice the function "theAlert" declared in the head of the document. It is later called up as a javascript link below. The simpler alert can be used on as stand-alone script. You'll notice the first one just calls up an alert. The second one calls up the function. Here's what the simpler one looks like (just click on smiley):

Here's the script:


<HEAD>
<Script Language="JavaScript">
function theAlert(){
alert('Text of the alert window' + '\n' + 'Line 2' + '\n' + 'Line 3');
}
</script>
<title>Alerts</title>

</HEAD>

<BODY>

<a href="javascript:alert('This is the Text')"><img src="imagename.gif"></a> <p>
<a href="javascript:theAlert()">Link text for an alert window</a>


Back