~ .Free Stuff. - .JavaScript. ~

How can I...

1. MouseOver Image Flipping?
2. Create my own "Back" Button?
3. Get a scrolling message in the browser's statusbar?
4. "Break" out of other's frames?
5. Make a status bar message?
6. Make different status message on a Mouse Over?
7. Create a Pop up Message Box?
8. Start a song once my web page loads?
9. Welcome a first time visitor to my site?

_____________________________________________________________

1. MouseOver Image Flipping?

Want your images to flip when you move your mouse over it? Look no further but here. We have a 3 page tutorial below:

MouseOver Image Flip Tutorial

_____________________________________________________________

2. Create my own "Back" Button?

You often need a back button if you use your own frames, since the normal button doesn't work that well with Frames. You can make you own graphic and can place it anywhere on your web page. Here is the code to do that:

<A HREF="javascript:history.back(); return false;">

_____________________________________________________________

3. Get a scrolling message in the browser's statusbar?

Want one of those annoying scrolling messages on your site? Since the code is kinda of big, I put it on another page.
(NOTE: Put all text on the ONLOAD line as 1 line or it won't work!)

<script><!-- scrolling js--------------------
function scroll_status (sval)
{
var msg = "
AR Scrolling Message!!!";
var out = " ";
var c = 1;
if (150 < sval) {
sval--;
var cmd="
scroll_status(" + sval + ")";
tmx2 = window.setTimeout(cmd, 25);
}
else if (sval <= 150 && 0 < sval) {
for (c=0 ; c < sval ; c++) {
out+=" ";
}
out+=msg;
sval--;
var cmd="
scroll_status(" + sval + ")";
window.status=out;
tmx2=window.setTimeout(cmd,25);
}
else if (sval <= 0) {
if (-sval < msg.length) {
out+=msg.substring(-sval,msg.length);
sval--;
var cmd="
scroll_status(" + sval + ")";
window.status=out;
tmx2=window.setTimeout(cmd,25);
}
else {
window.status=" ";
tmx2=window.setTimeout("
scroll_status(150)",25);
}
}
}
// -- end of scrolling js ------- --></script>

<BODY BGCOLOR="#FFFFFF"
OnLoad="
tmx1a=window.setTimeout('scroll_status(100)',50);">

_____________________________________________________________

4. "Break" out of other's frames?

Sick of being stuck in some else's frames? Get unstuck with the code below:

<SCRIPT LANGUAGE="JavaScript">
<!--
setTimeout ("
changePage()", 3000);
function changePage() {
if (self.parent.frames.length != 0)
self.parent.location="
http://www.ArtReality.com";
}
// -->
</SCRIPT>


_____________________________________________________________

5. Make a status bar message?

Want your site like mine, always having a mini message on the status bar while you look at my site? Here is the code to do that:

<body onLoad="window.defaultStatus='.Artistic Reality. - www.ArtReality.com'">

_____________________________________________________________

6. Make different status message on a Mouse Over?

Want to have a different message each time someone moves over a picture, hyperlink, etc. in the status bar? Code below:

<A HREF="index.htmll" onMouseOver="window.status='See the best web resource - Artistic Reality!';return true">

_____________________________________________________________

7. Create a Pop up Message Box?

Want to alert someone that they can't take stuff from your site, or that they can't sue you? This will do the trick:

<script language="JavaScript">
alert("
Put Your Text Here");
</script>

_____________________________________________________________

8. Start a song once my web page loads?

Want some music on your site? Usually this annoys me, but it might be good for the mood of some sites...

<SCRIPT LANGUAGE="JavaScript">
<!--
if(navigator.userAgent.indexOf("
MSIE") != -1)
document.writeln ('');
else
document.writeln ('<EMBED SRC="
yourmusic.mid" AUTOSTART= "true" HIDDEN="true" VOLUME="90%">');
//-->
</SCRIPT>

<BGSOUND SRC="yourmusic.mid">

_____________________________________________________________

9. Welcome a first time visitor to my site?

First time visitor to your site? Here is the code to welcome them! Change "XYZZY" to your name, or your site... (NOTE: Put all text on ONE line or it won't work!)

<SCRIPT LANGUAGE="JavaScript">
<!--
function GetCookie(name) {
var arg=name+"=";
var alen=arg.length;
var clen=document.cookie.length;
var i=0;
while (i<clen) {
var j=i+alen;
if (document.cookie.substring(i,j)==arg)
return "here";
i=document.cookie.indexOf(" ",i)+1;
if (i==0) break;
}
return null;
}
var visit=GetCookie("
XYZZY");
if (visit==null){
alert("
Put your text here and welcome the new only once!");
var expire=new Date();
expire=new Date(expire.getTime()+7776000000);
document.cookie="
XYZZY=here; expires="+expire;
}
// -->
</SCRIPT>

.Home.

.Free

.Articles.

.Web

.Game

.Web

.Portfolio.

.Award.

.Misc.

.Links.

.Contact.

Freebies ¤ Articles ¤ Web Design ¤ Game Design ¤ Hosting ¤ Award ¤ Misc ¤ Links ¤ Contact

~ Copyright © 1998 .Artistic Reality. All Rights Reserved. ~