Javascript Codes

Status
Not open for further replies.

Ron

||uLtiMaTE WinNER||
Hey,
Jus copy the code and save it as .html in notepad to shake your browser..........

Code:
<html>
<head>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function shake(n) {
if (parent.moveBy) {
for (i = 10; i > 0; i--) {
for (j = n; j > 0; j--) {
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
         }
      }
   }
}
//  End -->
</script>
</HEAD>
<body>
<div align="center">
<input type=button onClick="shake(2)" value="Shake Meeeeeeeee!"></div>
</body>
</html>

Note :
This code is not mine....
I got it long time back.......
Source: Not available....
 
Last edited:
OP
Ron

Ron

||uLtiMaTE WinNER||
Re: Shake ur Browser!!!!

shankar_ganesh said:
works well in IE, not firefox, on my PC.
Yaa.......
Morzilla asks to install plugin for it.....
 
OP
Ron

Ron

||uLtiMaTE WinNER||
Re: Shake ur Browser!!!!

hemant_mathur said:
Got a shake meee.. button in opera but it doesn't do anything.

Hey,
I dont hav Opera right now......However i will check it......
 
OP
Ron

Ron

||uLtiMaTE WinNER||
Re: Try To click On the 'NO'

Hey Frens,
Just copy the JavaScript code and save it as .HTML in Ur notepad. Then have fun while trying to click on "NO" button ……………
Code:
<html><head>
<SCRIPT LANGUAGE="JavaScript">
var flag = 1;
function t() {
if(flag == 1) {
N.style.top = "75px";
N.style.left = "700px";
}
if(flag == 2) {
N.style.top = "115px";
N.style.left = "100px";
}
if(flag == 3) {
N.style.top = "300px";
N.style.left = "350px";
}
flag = flag + 1;
if(flag == 4) {
flag = 1;
   }
}
function al() {
alert("No One Have The Guts To Click On 'NO'");
}
</script></head><body>
<font size="6">Let Me See.......................</font><p><font size="6">Who 
Have The <u>Guts</u><b> </b>To Click On &quot;<b><u>NO</u></b>&quot;....................</font></p>
<p>&nbsp;</p>
<DIV ID="N" STYLE="position:absolute; left:350px; top:300px; width:50px; height:50px;">
<form><input type=button value="NO" onMouseover="t()"></form></DIV>
<DIV ID="Y" STYLE="position:absolute; left:300px; top:300px; width:50px; height:50px;">
<form><input type=button value="YES" onClick="al()"></form></DIV>
</body></html>
 

shankar_ganesh

Journeyman
Re: Shake ur Browser!!!!

*pdhomes.net/music/isleofjersey/graphics/eyebrows.gif
^^ the above code is so cooooooooooooooooooool....... man!!!
it's lovely and i was unable to catch the 'NO' button
 

Kniwor

Learner
Re: Shake ur Browser!!!!

it does, u need to enable activeX, this is the reason it does not work in firefox
 
OP
Ron

Ron

||uLtiMaTE WinNER||
Build ur story!

Hey frens,
Who says creating a story is a difficult task.............
Just copy the following code and save as .html in ur notepad.
Code:
<html><HEAD>
<SCRIPT LANGUAGE="JavaScript">
function CreateWindow() {
msgWindow=window.open("","displayWindow","toolbar=no,width=350,height=400,directories=no,status=no,scrollbars=yes,resize=no,m

enubar=no")
}  
function create(form) {
var start="go";
if (start=="go") {
alert('Here we go...');
text = ("<HEAD><TITLE>Mark Anthony's Address from 'Julius Caesar' </TITLE> </HEAD>");
text += ("<BODY BGCOLOR =  '#FFFFFF'><CENTER><B><FONT FACE = 'Arial' SIZE = 4>");
text += ("Mark Anthony's Address from<BR> 'Julius Caesar' </FONT></B></CENTER><BR>");
text += ("Friends, Romans, " +form.input1.value+ " lend me your " +form.input2.value+ "; ");
text += ("I come to " +form.input3.value+ " Caesar, not to praise him. ");
text += ("The evil that men do lives after them, the good is oft interred with their " +form.input4.value+ "; ");
text += ("so let it be with " +form.input5.value+ ". " );
text += ("The noble Brutus hath told you Caesar was "  +form.input6.value+ "; if it were so, it was a grievous fault. ");
text += ("If you have " +form.input7.value+ ", prepare to shed them now. ");
text += ("You all do know this " +form.input8.value+ ". ");
text += ("I remember the first time Caesar put it on. ");
text += ("Through this well-beloved Brutus stabbed; for Brutus, as you know, was Caesar's " +form.input9.value+ ": ");
text += ("this was the unkindest " +form.input10.value+ " of all. ");
text += ("Here is the " +form.input11.value+ ", under Caesar's seal. To every Roman " +form.input12.value+ " he gives, ");
text += ("to every several man, seventy five " +form.input13.value+ ". ");
text += ("Here was a/an " +form.input14.value+ "! When comes another?");
msgWindow=window.open("","displayWindow","toolbar=no,width=375,height=480,directories=no,status=no,scrollbars=yes,resize=no,m

enubar=no")
msgWindow.document.write(text)
msgWindow.document.close()
   }
}
</SCRIPT><BODY><CENTER>
Fill in the form, and then press the button for your own Julius Caesar Madlib.<BR>
<BLOCKQUOTE><FORM>
<TABLE BORDER = 0 CELLPADDING = 2>
<TR><TD>Plural Noun:<TD><INPUT TYPE="text" NAME="input1" SIZE=20><BR>
<TR><TD>Part of body (plural):<TD><INPUT TYPE="text" NAME="input2" SIZE=20 ><BR>
<TR><TD>Verb:<TD><INPUT TYPE="text" NAME="input3" SIZE=20 ><BR>
<TR><TD>Name:<TD><INPUT TYPE="text" NAME="input4" SIZE=20 ><BR>
<TR><TD>Name of Polictician:<TD><INPUT TYPE="text" NAME="input5" SIZE=20 ><BR>
<TR><TD>Adjective:<TD><INPUT TYPE="text" NAME="input6" SIZE=20 ><BR>
<TR><TD>Article of Clothing:<TD><INPUT TYPE="text" NAME="input7" SIZE=20 ><BR>
<TR><TD>Article of Clothing:<TD><INPUT TYPE="text" NAME="input8" SIZE=20 ><BR>
<TR><TD>Occupation:<TD><INPUT TYPE="text" NAME="input9" SIZE=20 ><BR>
<TR><TD>Noun:<TD><INPUT TYPE="text" NAME="input10" SIZE=20 ><BR>
<TR><TD>Noun:<TD><INPUT TYPE="text" NAME="input11" SIZE=20 ><BR>
<TR><TD>Noun:<TD><INPUT TYPE="text" NAME="input12" SIZE=20 ><BR>
<TR><TD>Animal (plural):<TD><INPUT TYPE="text" NAME="input13" SIZE=20 ><BR>
<TR><TD>A Food:<TD><INPUT TYPE="text" NAME="input14" SIZE=20 ><BR>
</TABLE>
<BR><INPUT TYPE="button" VALUE="Create Window" ONCLICK="create(this.form)">
</CENTER></FORM></BLOCKQUOTE></CENTER><p><p>
</body></html>
-------
Now create your own story...........
No need of thinking............
---------
 
OP
Ron

Ron

||uLtiMaTE WinNER||
Change Your Mouse Cursor……

Hey Frens,
Change Your Mouse Cursor……
Code:
  <html><HEAD>
  <SCRIPT LANGUAGE="JavaScript">
  var x, y, xold, yold, xdiff, ydiff;
  var dir = Array();
  dir[0] = "n-resize";
  dir[1]="ne-resize";
  dir[2]="e-resize";
  dir[3]="se-resize";
  dir[4] = "s-resize";
  dir[5]="sw-resize";
  dir[6]="w-resize";
  dir[7]="nw-resize";
  document.onmousemove = FindXY;
  function display(direction) {
  document.body.style.cursor = dir[direction];
  }
  function FindXY(loc) {
  x = (document.layers) ? loc.pageX : event.clientX;
  y = (document.layers) ? loc.pageY : event.clientY;
  xdiff = x - xold;
  ydiff = y - yold
  if ((xdiff <  2) && (ydiff < -2)) display(0);
  if ((xdiff <  2) && (ydiff >  2)) display(4);
  if ((xdiff >  2) && (ydiff <  2)) display(2);
  if ((xdiff < -2) && (ydiff <  2)) display(6);
  if ((xdiff >  2) && (ydiff >  2)) display(3);
  if ((xdiff >  2) && (ydiff < -2)) display(1);
  if ((xdiff < -2) && (ydiff >  2)) display(5);
  if ((xdiff < -2) && (ydiff < -2)) display(7);
  xold = x;
  yold = y;
  }
  </script>
  <p align="left"><b><font size="5">See The Direcion OF Your Mouse</font></b></p>
 
OP
Ron

Ron

||uLtiMaTE WinNER||
Re: Shake ur Browser!!!!

Hey frens.........
I am not getting any reply....
Should i close this thread???
 
Re: Shake ur Browser!!!!

Hi Friends,

One more for u........

1. Go to Google
2. Click images
3. Type "flowers" or any other word.
4. You will get a page which is having full of images
5. Then delete the item from the address bar and paste the below script and enter

Pls see the script.txt

See the magic.


This will work in all pages which is having images and on firefox also.
:D
 
Last edited:

navjotjsingh

Wise Old Owl
Re: Shake ur Browser!!!!

Nothing happened on Google images thinkdigitreader? What should have happened? I am using Firefox 2.0.0.1!
 

NIGHTMARE

ANGEL OF DEATH
Re: Shake ur Browser!!!!

not working in IE and firefox
__________
@ RON cool buddy
 
Last edited:
OP
Ron

Ron

||uLtiMaTE WinNER||
Re: Shake ur Browser!!!!

NIGHTMARE said:
not working in IE and firefox
__________
@ RON cool buddy

which script is not working..................
__________
thinkdigitreader said:
Hi Friends,

One more for u........

1. Go to Google
2. Click images
3. Type "flowers" or any other word.
4. You will get a page which is having full of images
5. Then delete the item from the address bar and paste the below script and enter

javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3= 1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.images; DIL=DI.length; function A(){for(i=0; i<DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=Math.sin(R*x1+i*x2+x3)*x4+x5; DIS.top=Math.cos(R*y1+i*y2+y3)*y4+y5}R++}setInterval('A()',5); void(0)

See the magic.

This will work in all pages which is having images and on firefox also.
:D

Can u tell me wht exactly is the magic..................
 
Last edited:
Status
Not open for further replies.
Top Bottom