Different Home page message Apon Refresh!

View previous topic View next topic Go down

Different Home page message Apon Refresh!

Post by Sir Mayo ™ on 8/29/2013, 8:40 pm

Hello,


So First you need to goto your the place in your ACP where  you add your home page message!

Then Paste the following code:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
 <title>Random Message</title>
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 
<script type="text/javascript">
 var msgArr = new Array();
 msgArr[0] = "Message  here ";
 msgArr[1] = "Message  here ";
 msgArr[2] = "Message  here  ";
msgArr[3] = "Message  here  ";
msgArr[4] = "Message  here    ";
msgArr[5] = "Message  here ";


 window.onload = function () {
 document.getElementById("msgDiv").innerHTML = msgArr[Math.floor(Math.random()*msgArr.length)];
 }
</script>
</head>

<body><div id="msgDiv"></div>
</body>
</html>

Where you see message here just  Replace it with your message!

Bonus!!!! (forumotion only)

So lets say you want to add The person viewing the Sites Username to the message then use this code:

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
 <title>Random Message</title>
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 
<script type="text/javascript">
 var msgArr = new Array();
 msgArr[0] = "Message  here {USERNAME}";
 msgArr[1] = "Message here {USERNAME}";
 msgArr[2] = "Message  here {USERNAME}";
msgArr[3] = "Message  here {USERNAME}";
msgArr[4] = "{USERNAME}!!!! Message  here   ";
msgArr[5] = "Message  here  {USERNAME}";
msgArr[6] = "Message  here  {USERNAME} ";


 window.onload = function () {
 document.getElementById("msgDiv").innerHTML = msgArr[Math.floor(Math.random()*msgArr.length)];
 }
</script>
</head>

<body><div id="msgDiv"></div>
</body>
</html>

Again Just replace message here with your message! Very Happy But be sure to leave Guest in the message if you want the User name to Stay!
avatar
Sir Mayo ™
Owner

Owner

Posts : 76
Join date : 2013-05-14
Age : 21
Location : USA

View user profile http://sir-mayo.forumotion.com

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum