View Full Version : Random Message....
Recursion
13-03-2006, 01:12 PM
On the HobTech website they have that random message about your password and everytime you refresh it changes. I have made the JavaScript i just need to know how to get it into my page. Any Help?
Thanks,
:.:Numark:.:
Raremandan
13-03-2006, 01:34 PM
<script type="text/javascript">
Javscript code for alert here!
</script>
Recursion
13-03-2006, 01:40 PM
yes but I would put:
<script type="text/javascript">
What Here??!!??!!??
</script>
Raremandan
13-03-2006, 01:42 PM
<script language="javascript">
alert ("Alert here!")
</script>
Recursion
13-03-2006, 02:02 PM
Thats an Alert script which will take place whn the website loads, goto www.hobtech.net and goto the main site. There you will see a message at the side about your password or about habbo safety. That is what I want. If you refresh your page you wil get a different message. I know it runs of a JavaScript file. I have written my own. I just need to know the code to make the Browser acces the JS file, display the information and then take one of the messages from the JS file like on HobTech!
Thank You,
:.:Numark:.:
Desjardens
13-03-2006, 02:23 PM
<script type="text/javascript">
Javscript code for alert here!
</script>
I'll have to try that :D
Recursion
13-03-2006, 02:31 PM
I'll have to try that :D
I just need some way of it getting the stuff from the JS file and randomly selecting a message of it
Steven.
13-03-2006, 02:32 PM
Not sure if this is what your looking for but;
http://www.codelifter.com/main/javascript/randomquote.shtml :)
Recursion
13-03-2006, 03:10 PM
great!!! Thank-You!
You can do it in php aswell.
<?
$quote[1]="Your Text";
$quote[2]="Your Text";
$quote[3]="Your Text";
$random = rand(1, count($quote));
echo "$quote[$random]";
?>
Raremandan
13-03-2006, 04:03 PM
You can do it in php aswell.
<?
$quote[1]="Your Text";
$quote[2]="Your Text";
$quote[3]="Your Text";
$random = rand(1, count($quote));
echo "$quote[$random]";
?>
Yes Liam, this would be my way of doing it if that code is correct, i'm half asleep "/ but she asked for Javascript so I layed out the Javascript code :)
Recursion
13-03-2006, 05:26 PM
Yes Liam, this would be my way of doing it if that code is correct, i'm half asleep "/ but she asked for Javascript so I layed out the Javascript code :)
Uherm... Im a boy !! "/ - Sorry my name is a bit girlish. I only really use this name of Habbox
Lol just copy hobtechs:
var quotes=new Array()
quotes[0]='"Keep your Habbo Password a well kept secret!"'
quotes[1]='"Habbo Staff and Hobbas will never ask you for your password."'
quotes[2]='"Hobbas and Staff members have badges. Either silver and gold stars or a gold diamond. Do not be fooled!"'
quotes[3]='"A Habbo Staff member or Hobba will never add you to MSN or any other Instant Messaging programs."'
quotes[4]='"You should never use any scripting, or hacking software within the Hotel!"'
quotes[5]='"Never pester other Habbos if they do not want to chat to you."'
quotes[6]='"Never give out your person information, like your password, email address, and any other personals."'
quotes[7]='"Do not chat to Habbos that make you feel uncomfortable."'
quotes[8]='"Use the Call For Help feature if you are in need of urgent help. Use the Contact Us form for less urgent stuff!"'
quotes[9]='"Know a scammer, for have you been scammed? Report the Habbo to Scam Busters!"'
quotes[10]='"Your password is like your wallet. You do not give it away!"'
var whichquote=Math.floor(Math.random()*(quotes.length ))
document.write(quotes[whichquote])
Recursion
13-03-2006, 05:38 PM
i know thats how i learnt about the .JS file. It doesnt matter now though.
What? Something which says a random message?
<script type="text/JavaScript">
var messages = new Array ('I\'m happy','Habbox Forum is annoying','123 testing');
var messages_length = messages.length;
alert(messages[Math.floor(Math.random()*messages_length)]);
</script>
Flisker
13-03-2006, 07:12 PM
Thats random names in the script Nets lol
Recursion
13-03-2006, 07:24 PM
Ive got the script I need know! :) keep posting IF you want.
EDIT: I have just geven Steven. +Rep for the script!
Flisker
13-03-2006, 07:25 PM
Or i can Lock thread
Recursion
13-03-2006, 07:25 PM
if you want :) - Could be stickied under Tutorials?
Flisker
13-03-2006, 07:28 PM
No Sorry.
Thread Closed!
Want to hide these adverts? Register an account for free!
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.