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:.:
Printable View
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:.:
HTML Code:<script type="text/javascript">
Javscript code for alert here!
</script>
yes but I would put:
<script type="text/javascript">
What Here??!!??!!??
</script>
HTML Code:<script language="javascript">
alert ("Alert here!")
</script>
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:.:
I'll have to try that :DQuote:
Originally Posted by Raremandan
I just need some way of it getting the stuff from the JS file and randomly selecting a message of itQuote:
Originally Posted by Sunburn
Not sure if this is what your looking for but;
http://www.codelifter.com/main/javas...domquote.shtml :)
great!!! Thank-You!
You can do it in php aswell.
PHP Code:<?
$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 :)Quote:
Originally Posted by Liam.
Uherm... Im a boy !! "/ - Sorry my name is a bit girlish. I only really use this name of HabboxQuote:
Originally Posted by Raremandan
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])
i know thats how i learnt about the .JS file. It doesnt matter now though.
What? Something which says a random message?
Code:<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>
Thats random names in the script Nets lol
Ive got the script I need know! :) keep posting IF you want.
EDIT: I have just geven Steven. +Rep for the script!
Or i can Lock thread
if you want :) - Could be stickied under Tutorials?
No Sorry.
Thread Closed!