| Author |
Message |
|
Bucket
Contributor
Joined: Tue Dec 02, 2003 4:12 pm Posts: 1162 Location: USA
|
 Code for resizing browsers
What do you all think of this bit of code used for resizing a persons browser. Do you think this might piss some people off? I was thinking of using it, but then I got to thinking how this would probably make me mad if it was forced on me.
<script language="JavaScript" type="text/javascript">
<!-- Hide from old browsers
function maximizeWin() {
if (window.screen) {
/* The following two variables are assigned the users screen width and height in pixles */
var aw = screen.availWidth; /* get the screen width */
var ah = screen.availHeight; /* get the screen height */
if (aw >= 1024) { /* check for 1024 x 768 resolution or greater */
/* Ok the user has capability of 1024x768 or greater resolution so assign these values to aw and ah */
aw = 790
ah = 700
/* now position top-left-hand-corner of window position (pixles) use any resonable value you want */
window.moveTo(100,20);
} else {
if (aw < 1024) { /* check for 800 x 600 resolution or smaller */
/* OK so the resolution is lower than 1024x768 so use the screen values for aw and ah */
aw = screen.availWidth;
ah = screen.availHeight;
/* now position top-left-hand-corner of window position to 0, 0 */
window.moveTo(0,0);
}
}
}
/* call the function */
window.resizeTo(aw, ah);
}
/* now maximize the window to the values set */
maximizeWin()
// -->
</script>
|
| Tue Jan 06, 2004 10:15 pm |
|
 |
|
PhilC
Founder
Joined: Thu Nov 21, 2002 1:22 am Posts: 11147
|
If I came across it, I'd leave the site - they'd sell me nothing.
_________________ PhilC
Hidden Text
Search Engine Optimization articles and tools :: PageRank explained
|
| Wed Jan 07, 2004 1:18 am |
|
 |
|
Bucket
Contributor
Joined: Tue Dec 02, 2003 4:12 pm Posts: 1162 Location: USA
|
Yes I agree. Into the heap ye junky ol' code. It was good practice.
|
| Wed Jan 07, 2004 2:30 am |
|
 |
|
PhilC
Founder
Joined: Thu Nov 21, 2002 1:22 am Posts: 11147
|
You wrote it yourself?
|
| Wed Jan 07, 2004 12:17 pm |
|
 |
|
Mahoney
Member
Joined: Fri Jan 02, 2004 9:16 pm Posts: 25
|
I find it quite offensive and annoying when a website trys to resize my browser:) especially when they try to take my entire desktop.
_________________ Wallpapers
|
| Wed Jan 07, 2004 2:17 pm |
|
 |
|
PhilC
Founder
Joined: Thu Nov 21, 2002 1:22 am Posts: 11147
|
Me too. That's the worst type - where they remove all browser controls and fill the screen.
Even worse than that, though, is the practise of changing your home page setting to their site. Usually, you can just change it back but I came across one that you couldn't change back because everytime you did, it got changed back to their site again. It took a while to find and remove the files that were doing it and I figured that they owed me - so I stole some of their graphics and used them on one of my sites 
|
| Wed Jan 07, 2004 2:27 pm |
|
 |
|
Bucket
Contributor
Joined: Tue Dec 02, 2003 4:12 pm Posts: 1162 Location: USA
|
PhilC wrote: You wrote it yourself?
No not the original. I did have to modify the original quite a bit to get it to work correctly though. After I was done I got to thinking about it and realized that if I came across it, it would really piss me off, and decided to scrap it.
Its funny how you can get caught up in the moment. Your designing like crazy and overcoming some major hurdle and then it hits you that what you have created and been so proud of is actually evil. Your intentions are good but...
Its was probably the same for Frankenstein and his monster. 
|
| Wed Jan 07, 2004 3:34 pm |
|
 |
|
PhilC
Founder
Joined: Thu Nov 21, 2002 1:22 am Posts: 11147
|
Ah, but one of the joys of programming is solving the problems that come up - even if the solution isn't needed 
|
| Wed Jan 07, 2004 3:49 pm |
|
 |
|
Bucket
Contributor
Joined: Tue Dec 02, 2003 4:12 pm Posts: 1162 Location: USA
|
LOL
Technology for Technologies sake...
|
| Wed Jan 07, 2004 5:07 pm |
|
 |
|
writergrrrl48
Member
Joined: Mon Feb 09, 2004 7:13 pm Posts: 9 Location: Colorado,USA
|
I'm not understanding the issue - I don't program, so reading the code didn't help me :-)
Why is it bad for the site to resize? Is this the same idea as building your site so it fits different res monitors?
Thanks for answering a dumb question or 7
Cheri
|
| Mon Feb 09, 2004 7:32 pm |
|
 |
|
nickgust
Contributor
Joined: Wed Dec 31, 2003 2:24 am Posts: 1008 Location: Baltimore, MD
|
The resizing in this case is about making the browser bigger and smaller then the user had before. Allot of sites will do this where you click on a link and "POW!" there is a full screen popup window. You close that window and the browser rememebers the last size so next time you open something the same full screen size pops up.
_________________ Nick
Atkins Diet :: Economical Search Engine Optimization :: Blackberry Development
|
| Mon Feb 09, 2004 7:45 pm |
|
 |
|