| I hope you enjoy this section and that maybe
you can learn from it or brighten up your pages. They are javascripts that I have
wrote and am making freely avilable. Please leave all tags that are in the script in
place and link me on your pages ;) If you would like to submitt a script then please
let me know. This script will display random
links on a page when it loads. You can obviously change that to be quotes or a
message of the day. Remeber that when you want to add more quotes/links to change
the array numbers, they have been highlighted in green. If you have any questions,
please post them onto my weboard.
<html>
<head>
<title>Randon Script Generator</title>
<script language="javascript">
<!--
/* Random link generator by tress
Copyright of tresspasser http://hackor.cjb.net
You can use this script or modify it as long as
you keep these tags in place */
linker = new Array(4)
/* we miss the 0 because it causes undefinied and we don't want that
want to add more links, i think you can see the pattern change the random number, new
array and linker,
they all have to be the same number all the script will fuck up */
linker[1] = "<a
href=http://www.yahoo.com>Yahoo</a>"
linker[2] = "<a href=http://www.microsoft.com>Microsoft</a>"
linker[3] = "<a href=http://www.hackor.cjb.net>_TreSSpaSSeR_</a>"
linker[4] = "<a
href=http://www.slashdot.com>Slashdot</a>"
function randomize()
{
x = Math.ceil(Math.random() * 4)
links = linker[x]
document.write("<p><h3>" + links +
"</h3><br><font face=verdana size=2 color=black> coded by
tresspasser</font>")
}
</script>
</head>
<body bgcolor="#C0C0C0">
<script>
randomize()
</script>
</body>
</html>
This second script could be used a random password
protection or as a math test !! It will ask the user a a multiply question when the
enter the page and they have 3 attemps to answer it. I have highlighted the varibles
that you can change into green.
<html>
<head>
<script language="javascript">
<!--
/* script specialist tresspasser -==- Do help your self to this scripts but if
you do take/modify them please retains these copyrights. All scripts copyright of
_TreSSpaSSeR_ - http://hackor.cjb.net */
num1 = Math.round(Math.random()*20)
num2 = Math.round(Math.random()*20)
for(count = 0; count < 3;
count++)
{
answer = prompt("What is " + num1 + " times " +
num2 + " ? ")
if(answer==num1*num2)
break
}
if(count == 3)
alert("The answer was " + (num1 * num2) + " you silly
prick")
else
alert("Well Done")
// -->
</script>
<title>Demo</title>
</head>
<body bgcolor="#000000">
</body>
</html>
This next script will allow you to create a pull down menu
on your page. Again, the code is a html template and you will need to follow the
pattern for it to work. Only change the things that I highlight. If you have
any questions regarding this script please post the question in the weboard.
<html>
<head>
<SCRIPT LANGUAGE="JavaScript">
<!--
*/ Script Specialist TreSSpaSSeR if you use this script
keep these tags in place - have respect
--== http://hackor.cjb.net ==-- /*
function openDir (form)
{
if (form.directory.selectedIndex == 0)
window.location.href="http://www.yahoo.com";
if (form.directory.selectedIndex == 1)
parent.window.location.href="http://hackor.cjb.net";
if (form.directory.selectedIndex == 2)
window.location.href="http://slashdot.org";
if (form.directory.selectedIndex == 3)
window.location.href="http://www.fbi.gov";
}
// -->
</SCRIPT>
<title> s c r i p t </title>
<body bgcolor="black">
<FORM NAME="myform">
<SELECT NAME="directory">
<OPTION SELECTED="SELECTED">Yahoo </OPTION>
<OPTION>Back to my page</OPTION>
<OPTION>Slashdot.org</OPTION>
<OPTION>FBI</OPTION>
</SELECT>
<INPUT TYPE="button" NAME="button" VALUE=" Take Me There "
ONCLICK="openDir(this.form)">
</FORM>
</body>
</html> |