Click to See Complete Forum and Search --> : JavaScript Alert (NEED HELP)
ScßipTaß
11-11-2003, 02:33 AM
Hi, I was wondering if their in anyone out there that can help me with the JavaScript coding for an alert box for my site... for example.. as soon as someone clicks to enter my site I want them to see an alert box that says "Welcome to the New Guild!!!" before they even see the site.. I've been on other sites that had the code but I just can't seem to get it to work.. I must be doing something wrong! so, anyway.. I need somebody that can type up the code for me (if they don't mind) I would really appreciate it a whole lot!
ScßipTaß
11-11-2003, 02:45 AM
This is what I know so far.. I just don't know why it won't work... what do you think im doing wrong...
To put a Javscript Alert box on your page, put the code that appears below inside the HEAD tag, just before </HEAD>. Of course you will want to change the message it displays:
<SCRIPT LANGUAGE="JAVASCRIPT">
<!--
alert("\r\nSTUDENTS IN CI210 NOTE!!! - \r\There has been a change in the schedule!!!!!\r\nThe test scheduled for September 23 has been postponed a week until September 30. There are no changes in the dates for quizzes.\r\nThose of you in the telecommunications project, please check your E-mail frequently - at least twice a week and preferably each day.\r\nI have just sent everyone a short PINE manual. You should print this out, study it, and put it in your portfolio.\n\nCLICK THE OK BUTTON TO CONTINUE ON TO THE HOME PAGE.")
//-->
</SCRIPT>
Here is a key to some of the punctuation you may need when you change the message:
\n
newline
\t
tab
\r
carriage return
\f
form feed
\b
backspace
Robin_R
11-11-2003, 08:36 AM
Originally posted by ScßipTaß
[B]This is what I know so far.. I just don't know why it won't work... what do you think im doing wrong...
To put a Javscript Alert box on your page, put the code that appears below inside the HEAD tag, just before </HEAD>. Of course you will want to change the message it displays:
<SCRIPT LANGUAGE="JAVASCRIPT">
<!--
alert("\r\nSTUDENTS IN CI210 NOTE!!! - \r\There has been a change in the schedule!!!!!\r\nThe test scheduled for September 23 has been postponed a week until September 30. There are no changes in the dates for quizzes.\r\nThose of you in the telecommunications project, please check your E-mail frequently - at least twice a week and preferably each day.\r\nI have just sent everyone a short PINE manual. You should print this out, study it, and put it in your portfolio.\n\nCLICK THE OK BUTTON TO CONTINUE ON TO THE HOME PAGE.")
//-->
</SCRIPT>
This shouldn't be in the head-tag. Put it directly after <body>. Then this is the first thing the user will see on your page