Alerts

Radio Button Alert

Click on one of the radio buttons to see a message

1: 2: 3:

Here's the code for this.

<FORM>

1: <INPUT TYPE="radio" NAME="radio" VALUE="Cool Uh?"
      onClick="alert(this.value);">

2:<INPUT TYPE="radio" NAME="radio" VALUE="Here's another message"
      onClick="alert(this.value);">

3:<INPUT TYPE="radio" NAME="radio" VALUE="Here's the last one"
      onClick="alert(this.value);">

</FORM>

top

Button Alert

Push this button to make a message appear.

Here's the code.

<FORM>
    
<INPUT TYPE="button" VALUE="message" onClick="alert('this is the message');">
</FORM>

top

Welcome Alert

As you entered the page you received an alert message.

<BODY onLoad="alert('Welcome!!!);">

top

Goodbye Alert

To see this alert(), click on another link or press the back button.

<BODY onUnLoad="alert('Good Bye!!!);">

top

Link Alert - onClick

When you click on a link like this, an alert will pop up and then you will be taken to the link destination. Give it a shot! To make use of this SCRIPT, copy the following lines of code.

<A HREF="Link Goes Here" onClick="alert('Your Message Goes Here');">
Your Link Description Goes Here
</A>

top

Link Alert - onMouseOver

The next line is

<A HREF="javascript:void("")" onMouseOver="alert('Hee hee!');">
Mouse over me!
</A>

This is just like the example above, but it uses an onMouseOver instead of an onClick.

top

Link Confirm/Cancel Alert

Click on the link to see this example. CLICK ME!!

Here how it works. Just put this part in your HEAD tag and then change YOUR CONFIRM MESSAGE and YOUR LINK GOES HERE.

<SCRIPT>

function ruSure() {
     var question = confirm("YOUR CONFIRM MESSAGE");

     if (question == true) { // OR if (question)
          location.href = "YOUR LINK GOES HERE";
     }
}

</SCRIPT>

Now put this anywhere in your page and change YOUR LINK DESCRIPTION

<A HREF="javascript:void("")" onClick="ruSure();">
YOUR LINK DESCRIPTION
</A>

top

Link Confirm/Cancel Alert - 2 Links

Click on the links to see these examples. CLICK ME!! or CLICK ME!!

Here how it works. Just put this part in your HEAD tag and then change YOUR CONFIRM MESSAGE and YOUR LINK GOES HERE.

<SCRIPT>

function ruSure() {
     var question = confirm("YOUR CONFIRM MESSAGE");

     if (question) {
          location.href = "YOUR LINK GOES HERE";
     }
}

function ruSure1() {
     var question = confirm("YOUR CONFIRM MESSAGE");

     if (question == false) { // OR if (!question)
          location.href = "YOUR LINK GOES HERE";
     }
}

</SCRIPT>

Now put this anywhere in your page and change YOUR LINK DESCRIPTION

<A HREF="javascript:ruSure();">
YOUR LINK DESCRIPTION
</A>
<A
HREF="javascript:ruSure1();">
YOUR LINK DESCRIPTION
</A>

top

 Confirm/Cancel Alert - New Window

Click this to see the example!

Here it goes...put this in your HEAD tag and change CONFIRM MESSAGE and LINK LOCATION and any of the window properties.

<SCRIPT>

function winConfirm() {
     var question = confirm("CONFIRM MESSAGE");

     if (question) {
          window.open("LINK LOCATION", "NewWin",
          "toolbar=yes,location=yes,menubar=yes,scrollbars=yes,width=635,height=260");
     }
}

</SCRIPT>

Now throw this somewhere in your page and change the LINK DESCRIPTION.

<A HREF="" onClick="winConfirm(); return false;">
YOUR LINK DESCRIPTION
</A>

top