View unanswered posts | View active topics It is currently Sat Jul 31, 2010 3:08 am



This topic is locked, you cannot edit posts or make further replies.  [ 11 posts ] 
 Code for resizing browsers 
Author Message
Contributor
Contributor

Joined: Tue Dec 02, 2003 4:12 pm
Posts: 1162
Location: USA
Post 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
Profile WWW
Founder
Founder

Joined: Thu Nov 21, 2002 1:22 am
Posts: 11147
Post 
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
Profile WWW
Contributor
Contributor

Joined: Tue Dec 02, 2003 4:12 pm
Posts: 1162
Location: USA
Post 
Yes I agree. Into the heap ye junky ol' code. It was good practice.


Wed Jan 07, 2004 2:30 am
Profile WWW
Founder
Founder

Joined: Thu Nov 21, 2002 1:22 am
Posts: 11147
Post 
You wrote it yourself?


Wed Jan 07, 2004 12:17 pm
Profile WWW
Member

Joined: Fri Jan 02, 2004 9:16 pm
Posts: 25
Post 
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
Profile
Founder
Founder

Joined: Thu Nov 21, 2002 1:22 am
Posts: 11147
Post 
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 8)


Wed Jan 07, 2004 2:27 pm
Profile WWW
Contributor
Contributor

Joined: Tue Dec 02, 2003 4:12 pm
Posts: 1162
Location: USA
Post 
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. :D


Wed Jan 07, 2004 3:34 pm
Profile WWW
Founder
Founder

Joined: Thu Nov 21, 2002 1:22 am
Posts: 11147
Post 
Ah, but one of the joys of programming is solving the problems that come up - even if the solution isn't needed :D


Wed Jan 07, 2004 3:49 pm
Profile WWW
Contributor
Contributor

Joined: Tue Dec 02, 2003 4:12 pm
Posts: 1162
Location: USA
Post 
LOL
Technology for Technologies sake...


Wed Jan 07, 2004 5:07 pm
Profile WWW
Member

Joined: Mon Feb 09, 2004 7:13 pm
Posts: 9
Location: Colorado,USA
Post 
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 :lol:

Cheri


Mon Feb 09, 2004 7:32 pm
Profile WWW
Contributor
Contributor

Joined: Wed Dec 31, 2003 2:24 am
Posts: 1008
Location: Baltimore, MD
Post 
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
Profile WWW
Display posts from previous:  Sort by  
This topic is locked, you cannot edit posts or make further replies.   [ 11 posts ] 

Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Latest Blogs
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF

phpBB SEO