Web Host Directory Forums

View original thread:  Java script not working.


Pages: 1 
sinker747
This is my java script. Why isn't it working?

<html> <head> <title>Hello and welcome to my site</title>

<script language="JavaScript">

<!-- hide me

alert("Here is some pop up boxes for you");

alert("And there are lots of them");

alert("I don't know how many exactly at the moment becuase I haven't counted");

alert("But I will count it. If it is counted it will be on the next pop up box");

alert("You may be here a while if I get my way");

alert("Becuase there is nothing you can do until you have clicked them all");

alert("Haha haha haha haha haha haha!");

alert("So enjoy");

alert("Because it's gonna be a blast");

alert("If there aren't many it's because I just started. I'll get a ton more up later");

alert("So I guess you don't like pop up boxes");

alert("Otherwise you would not be so angry right now with all these pop up boxes");

alert("I'll stop bothering you when these pop up boxes stop appering");

alert("Press Ok to format drive C:\");

alert("When these pop up boxes stop appearing you will see what is in your C drive");

alert("I plan to have over 600 alert boxes when I am done this site");


// end hide -->


</script>
Tommy
I couldn't work it out so I created a new one for you. Try this:

<html>

<head>
<title>Alert box</title>
<script language="JavaScript">
<!-- Hide the script from old browsers --
function loadalert ()
{alert("Hello Forum readers, I am an Alert box")
}
// --End Hiding Here -->
</script>
</head>

<body onLoad="loadalert()">

<p>Alert box...simple, and useful to remind your visitor's of something!</p>
</body>
</html>
akashik
Am I the only one that things it's works better by not working at all?

Greg Moore
Tommy
Good point Greg, but I think Sinker is undertaking an academic excercise in JavaScript so as an excercise I gues it ain't so bad.

sinker, if you're looking for some scripts try www.scriptlocker.com
Return to Thread List