| View previous topic :: View next topic |
|
|
|
| Author |
Message |
Bucket
Advanced Member

Joined: 02 Dec 2003
Posts: 1471
Location: USA
|
Posted: Tue Jan 06, 2004 10:15 pm
|
|
| Post subject: 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> |
|
|
| Back to top |
|
 |
PhilC
Site Admin

Joined: 21 Nov 2002
Posts: 13052
|
|
| Back to top |
|
 |
Bucket
Advanced Member

Joined: 02 Dec 2003
Posts: 1471
Location: USA
|
Posted: Wed Jan 07, 2004 2:30 am
|
|
| Post subject: |
|
|
| Yes I agree. Into the heap ye junky ol' code. It was good practice. |
|
|
| Back to top |
|
 |
PhilC
Site Admin

Joined: 21 Nov 2002
Posts: 13052
|
|
| Back to top |
|
 |
Mahoney
Member
Joined: 02 Jan 2004
Posts: 25
|
Posted: Wed Jan 07, 2004 2:17 pm
|
|
| Post subject: |
|
|
| I find it quite offensive and annoying when a website trys to resize my browser:) especially when they try to take my entire desktop. |
|
|
| Back to top |
|
 |
PhilC
Site Admin

Joined: 21 Nov 2002
Posts: 13052
|
Posted: Wed Jan 07, 2004 2:27 pm
|
|
| Post subject: |
|
|
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  |
_________________ PhilC
Hidden Text
Search Engine Optimization articles and tools :: PageRank explained |
|
| Back to top |
|
 |
Bucket
Advanced Member

Joined: 02 Dec 2003
Posts: 1471
Location: USA
|
Posted: Wed Jan 07, 2004 3:34 pm
|
|
| Post subject: |
|
|
| 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.  |
|
|
| Back to top |
|
 |
PhilC
Site Admin

Joined: 21 Nov 2002
Posts: 13052
|
|
| Back to top |
|
 |
Bucket
Advanced Member

Joined: 02 Dec 2003
Posts: 1471
Location: USA
|
Posted: Wed Jan 07, 2004 5:07 pm
|
|
| Post subject: |
|
|
LOL
Technology for Technologies sake... |
|
|
| Back to top |
|
 |
writergrrrl48
Member

Joined: 09 Feb 2004
Posts: 10
Location: Colorado,USA
|
Posted: Mon Feb 09, 2004 7:32 pm
|
|
| Post subject: |
|
|
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 |
|
|
| Back to top |
|
 |
nickgust
Advanced Member

Joined: 31 Dec 2003
Posts: 1218
Location: Baltimore, MD
|
Posted: Mon Feb 09, 2004 7:45 pm
|
|
| Post subject: |
|
|
| 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 |
|
| Back to top |
|
 |
|
|
|
|