<-->



Fun items to add to YOUR webpage!

Welcome to LeFantome Tricky JavaScripts. On this page I hope to have some javascripts you can cut and paste in your webpage to bring it to life and add some plazzaz to your website. I only use scripts that I am using myself on this website so I know they work and can work on your WebTV site.

The First script for your HP is a greeting when the brouser come to your page. It offers a greeting "Good Morning", Good Afternoon, Good Evening or other scripts depending on the time of day. It runs by the clock in your WebTV chip. You place the script between the (head) and (/head) on your webpage.

GREETINGS SCRIPT Example page

Second script is a 6 line scrolling script for the status bar. It runs from left to right and loops continually. You place the script in your body tag.Change the script to suit your site.

SIX LINE SCROLLER Example page

Cool Scrolling Button
Here is the script!

The background changes colors in this script in pastel colors every 5 seconds that will go with any dark fonts. The javascript goes between the (head)(/head) tags and the command goes in your body tag to begin.

BACK GROUND CHANGER Example page

Backgrounds flashing wildly is my next script! You are asked to turn on the background and it will begin flashing a series of colors quickly. Pressing off will reload the page. The script goes right after (head) in the html.

FLASHING BACKGROUND Example page

The Apology email generator consists of a series of alert messages to whomever lands over a link in your page! It then preceeds to send them to your mailbox to mail YOU an apology for landing there! LOTS of FUN and you get to greet your guests on your site. I recommend you put the script down in the bottom of your page or they will never get to read your page! script goes in the body.

APOLOGY EMAIL Example page

Javascript can be informative too! Our next script tells the viewer how many sites that they have been to in the history of the time they have been online. Place the script after the head of the page.HISTORY SCRIPT

For those webbers who wanna see whom comes to their site here is a great script to find out! You provide a button with an tantalizing message that the viewer will click onto and it immediately sends you an email from the viewers box! To use the script place the first part of the scripting between the heads tag; the second on the body tag and in the body of the page place the form button to mail. You can change the words the buttons says, and be sure to change the address to your address you want it to mail to. It is called

THE DEVIOUS VISITOR MONITOR Example page

A simple little script that lets the viewer know when your page was last modified is the MODIFICATION! It goes in the body of your email.

Here is what is does....

My favorite script is one that plays a series of midis randomly in your page and tells the viewer which of those midis that they are listening to! On this one which goes between the heads and has a tag in the body also you need to change the midis to your that you have in your filemanager and they all must be of the same format ie. mid, wav, au, ram etc...

RANDOM MIDI PLAYER Example page

A status bar flashing wildly is our next script. You need to add your own short message to flash. Begin by putting the javascript between the head tags and then follow in the body tag the command to make it work!

onload="flash();"> Have Fun! FLASHING STATUS BAR Example Page

The next script does nothing if your page loads correctly, but if the Javascript is not enable will produce an alert to the viewer to reload

From Prototype and very useful. Just cut and paste the script!

Mouse Over Text in Status Bar
This will put the text of your choice in the status window, lower left of your screen, whenever someone highlights the chosen link:



A Random QUOTE Script! just add your own quotes and have one pop up whenever you go to a page. Does NOT work in e=mail!
GET IT HERE

Typewriter Script

This script makes your text type out like a typewriter typing each word.

JavaScript mailer form


This is a variation of a form mailer that enables a person to compose an email from your site never leaving it to mail. Original script by Diane Dumas and modification by Karl (Neo)....

Have a question for LeFantome?

a simple alert onMouseOver- <a href="document.html" onMouseOver="alert('This link takes you to document.html');return true">link1.html</a> ------------------- a simple alert onMouseOut- <a href="document.html" onMouseOut="alert("What why not go to that link?');return true">link1.html</a> ---------------- a simple status bar onMouseOver- <a href="document.html"onMouseOver="window.status='hey this link is great!';return true">link1</a> ------------------------   a simple onMouseOut- <a href="document.html" onMouseOut="window.status='Couldnt handle the link huh?';return true">link1</a> -------------------------------- a link with them both in it with a twist <a href="document.html" onMouseOver="document.BgColor='red';return true" onMouseOut="window.status='Neat effect huh?';return true">link1</a> ------over view---------- onMouseOver is when the cursor goes over the link- onMouseOout is when the cursor leaves the link- alert('something here') is just a simple prompt ') window.status='Is just a way to print text in the status bar';return true document.BgColor="color" makes the pages bgcolor a noted color

Play music on Non Musical Link page

Tip from Cyber-Junkie...... If you want to play music or a wav on a link that doesn't have music just add this code to your page. Now if you want different music on different links just add the code like it is here but change the name="run" to name="whatever" and also change the onClick="document.run.play(false) to onClick="document.whatever.play(false)   <embed src="http://www.geocities.com/goodygumdrops4u/NIGHT.MID " hidden="true" name="run" autostart="false"><a href="http://www.lefantome.com/" onClick="document.run.play(false)"target="_blank"> LeFantome.com</a>

*No-Click mouseOver Link*

The code below will automatically take you to where you link it to without clicking on it.
Your cursor should be where it says (Link Here), now move it over onto where it says (Put cursor here!) and you will be brought right back to this page. Go ahead! Try it!

NOTE: Press "scroll down" button once to skip this trick.


Link here

Put Cursor Here!

Here's the mouseover code:

<<>a href="" onmouseover="parent.location='http://the full url here'"<>>Text or Image Here<<>/a<>>


Automatic Scrolling Page

To get a page to scroll automatically use this script between the head commands. It is preferable if the page is simple and does not contain a whole lot of hard to load graphics....
<SCRIPT LANGUAGE="JavaScript"> <!-- function myScroll() { window.scrollBy(0,25) setTimeout('myScroll()',25); } if (document.layers || document.all) myScroll() //--> </SCRIPT>Or try this script if the other one is too fast. <!-- Place this code in the head section of your web page--> <SCRIPT LANGUAGE="JavaScript"> <!-- function myScroll() { window.scrollBy(0,1) setTimeout('tomScroll()',20); } if (document.layers || document.all) myScroll() //--> </SCRIPT>

Passwords for you site!


Caution! Using password protected site may be in violation of some servers TOS so use with caution. Anyways though here is a script to bring up a popup that requires a password to enter.
<script language="javascript"> <!-- //start var password=prompt('ENTER THE PASSWORD'); if(password=="html") { alert('You have entered the right password!! Welcome') location="http://whatever url you want here" } else { alert('BAD PASSWORD: ACCESS DENIED') location="http://whatever url you want here" } //--> //end </script> Have Fun!!

MORE TO COME IN THE COMING WEEKS!