Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Javscript in a frame which shakes the browser/windows ( called also earthquake) have problem with IE

Reply
Thread Tools

Javscript in a frame which shakes the browser/windows ( called also earthquake) have problem with IE

 
 
francisco lopez
Guest
Posts: n/a
 
      01-04-2005
hallo,

I Have the following problem:

I want to shake (earthquake-effect) the browser when someone hits the
button.
So I used the following script:

-----------------------------------------------------------------
between <head></head>:

<script language="JavaScript">
function shake(n) {
if (top.moveBy) {
for (i = 15; i > 0; i--) {
for (j = n; j > 0; j--) {
top.moveBy(0,i);
top.moveBy(i,0);
top.moveBy(0,-i);
top.moveBy(-i,0);
}}}
alert("a que jode eh, mamón! a ver si la próxima vez nos comportamos
en el cine!");}
</script>

and in the <body></body>:

<img src="buttonend1.jpg" name="Image23" width="50" height="53"
border="0" value="Earthquake!" onClick="shake(15)">
---------------------------------------------------------
the button is situated in a frame.

I WORKS 100% with Firefox but the shake-effect doesn´t work with
Internet Explorer, only if I open the frame as a single side than it
works also wit IE.
So I tried to rename every "top.moveBy" to "parent.moveBy) and it
still doesn´t work.
Where is the mistake? What do I wrong?
Was it the correct way to call the parent Frame?

hope you can help me would be grate if it works,

regards

Francisco.

pd:

I have read that the "earthquake-effect" can harm the computer? but I
read also that it is impossible to harm the computer with this
javascript?
So what is now true?
 
Reply With Quote
 
 
 
 
Michael Winter
Guest
Posts: n/a
 
      01-04-2005
On 3 Jan 2005 16:19:34 -0800, francisco lopez <> wrote:

[snip]

> I have read that the "earthquake-effect" can harm the computer?


It won't harm the computer, but it certainly will confuse or annoy users.
For that reason alone you shouldn't use it.

By the way, frames are another thing that should generally be avoided.

[snip]

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why is a button Click event also called when a textbox TextChanged event is called??? S_K ASP .Net 6 11-08-2007 07:44 PM
have a look at my blog site for asp.net .. there is microsoft contest also ( u can win so much)have a look at my blog site for asp.net .. there is microsoft contest also ( u can win so much) justpratik Python 0 06-08-2007 04:48 AM
Computer Display Shakes: Should I Be Worried? Julie P. Computer Support 16 10-08-2005 02:47 PM
Monitor display shakes after sleeping Julie P. Computer Support 11 04-03-2005 06:35 PM
IE shakes! IAN GARDNER Computer Information 7 09-17-2004 09:44 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57