hello, i am looking a a specific javascript code for a school project. what the code does is it re-sizes your window to a specific size, and then makes it jump around to the four corners of your screen. a perfect example of this would be the rick roll site called
http://www.20b.org/rickroll.htmlits best viewed in internet explorer, and will take effect after you allow it on the top pop up window. it seems that the latest version of firefox disables the window resizing and movement, so use IE. after examining the page source, i managed to find this code.
window.resizeTo(640,625);
window.moveTo(0,0);
for (i = 1; i <= 9; i++){
setTimeout('window.moveTo(1599,1199);', i+"000");
i++;
setTimeout('window.moveTo(0,1199);', i+"000");
i++;
setTimeout('window.moveTo(1599,0);', i+"000");
i++;
setTimeout('window.moveTo(0,0);', i+"000");
}
the code worked perfectly on the macs used at school. but however, when i took it home and tried it on my PC, which has a different sized monitor, it didnt work right. my copied code section seemed to jump off the edges of the screen, like it was using the size of a Macs monitor, yet the original website works fine. this led me to believe that the source code seems to find the size of the monitor and adjust the position of where it moves. i cant seem to find that part of the code. any help would be appreciated