473,320 Members | 2,073 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Problem resizing the window

Hi,
can someone help me please.
I want to reload th page after resizing the window (Browser). I used the
event onresize.
The problem the server gets too many requests (on every resize: pixel by
pixel).
window.onresize = myfunction();
What can I do to reload the page only after releasing the mouse.
Thanks.
Nabil Benamar.
Jul 23 '05 #1
2 1840
Nabil Benamar wrote:
Hi,
can someone help me please.
I want to reload th page after resizing the window (Browser). I used the
event onresize.
The problem the server gets too many requests (on every resize: pixel by
pixel).
window.onresize = myfunction();
What can I do to reload the page only after releasing the mouse.
Thanks.
Nabil Benamar.

Use settimeout to wait 3 seconds or so after resize, then reload the
page. It will set a timeout for every single pixel it gets resized but
once the page gets reloaded, the ensuing timeouts will be gone.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/
Jul 23 '05 #2
Ivo
"Nabil Benamar" wrote
I want to reload th page after resizing the window (Browser). I used the
event onresize.
The problem the server gets too many requests (on every resize: pixel by
pixel).
window.onresize = myfunction();
What can I do to reload the page only after releasing the mouse.


What is the reason for the reloading? I can't think of one which would be
necessary, certainly not in "all" browsers. Nevertheless, an idea:

var globalvar=false;
onresize=flag;
onmousedown=unflag;
onmouseup=trigger;

function flag(){ globalvar=true; }
function unflag(){ globalvar=false; }
function trigger(){ if(globalvar==true) doyourthing(); }

HTH
Ivo
Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: riki | last post by:
Hi, i have a big problem...i'm using one jscript for resizing of all of my pics in popUp...in main html i'm having many little pics and clicking on them they open in popUp and resize to larger...
8
by: Freek te Water | last post by:
Hi, Hope no-one is offended by my probably noob question... Context: I have a web page design, which always centres in the middle of the screen (using a 100%*100% HTML-table). Now I also use...
0
by: TJ Talluto | last post by:
<facts> I have a "month calendar" that always displays exactly 42 days... and alongside is a vertical box that displays the detail (form fields) of any particular select event that appears on the...
10
by: David McCulloch | last post by:
The following code opens a new window, but the "resizeTo" doesn't resize it. Why not? (Don't ask why I simply did not open the window with the new size....my original problem was how to open a...
3
by: eft0 | last post by:
I have a big problem after I install SP2 in XP Box, some functions - window.resizeBy() - in my code, give a error like this: Access Denied. Some similar experience ?, any ideas what's...
36
by: Simon Wigzell | last post by:
I have the following in my webpage: <body onresize=CenterIt(); onMouseMove=mouseCheck(event);> CenterIt and mouseCheck are my own javascript functions. Works fine for IE and Opera, doesn't...
3
by: James Spibey | last post by:
Hi, I have an MDI application which has aboout 10 child windows. The way the app needs to work is that only one window should be visible at a time and it should be maximized within the parent...
7
by: Dino Buljubasic | last post by:
Hi, I am using C# 2.0 (VS2005) to build my user control that contains a number of dynamically loaded ListViews. ListViewItems have their ForeColor properties set to either black or blue to...
1
by: Captain Nemo | last post by:
Hi I've written some javascript code for a pop-up window which presents a series of images. These images are of various dimensions, so that when each picture is loaded, the window is resized...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.