Forgot Password / Register
Site Statistics
Total Members: 520
Total Tutorials: 242
Newsest User: 8884244477
Todays Unique Hits: 262
0 Users 3 Guests Online

Alerts

This tutorial will teach you the basics of javascript alerts and how usefull they really can be.

The basic command for a javascript alert is:

Code
alert('your choice of text')


Say you wanted and alert to pop-up when someone click's a link? Well easily done just use the following code:

Code
<A HREF="alert('Alert!')">Alert!</A>


You can spice up the links about by adding some conditions do it, the following code will make the alert pop-up on a mouseover:

Code
<A HREF="noplace" onMouseover="alert('Alert!')">Alert!</A>


So there you have it, the basics of the alert command in javascript this can be used in many usefull ways and can be a site greeter.

Craig.
Craig
Author:
Views:
1981
Rating:
Posted on Friday 4th April 2008 at 09:04 PM
DanielXP
DanielXP
just like any one could dos any site
Posted on Friday 4th April 2008 at 08:33 PM
Diablosblizz
Diablosblizz
Dark, I would advice that you NEVER put your IP on any website. I can now take your IP and do a HTTP DOS on it. Not saying that I would, but I would advice that you shouldn't.
Posted on Friday 4th April 2008 at 06:17 PM
darklight19
darklight19
http://76.98.141.11/tools/javascriptpromt/index.php
Posted on Friday 4th April 2008 at 05:45 PM
darklight19
darklight19
Hold on. kthx, i will PM you when I'm done typing up the thing
Posted on Friday 4th April 2008 at 05:35 PM
Dalez
Dalez
So where do i put that? and do i have to make my own text box?
Posted on Friday 4th April 2008 at 05:31 PM
darklight19
darklight19
<script type="text/javascript">
function prompter() {
var reply = prompt("Hey there, good looking stranger! What's your name?", "")
return reply
}
</script>
Posted on Friday 4th April 2008 at 04:09 PM
Dalez
Dalez
How would you make it so that you could make an alert to sed to your users on your website? Like going into the admin panel, and then putting the text into a box, press send and then every one on my site gets it?

Thank