Get a Quote Today!   |   + 1 (301) 424 3903




 
  Community
 
Need Help?
Visit our Training page
Request a Quote or Consultation
SIGN UP FOR THE TERATECH NEWSLETTER
 

ColdCuts

Cut: JavaScript Problem
Cut#: 138 
Cut Date: 11/11/1999 
Cutter: Daniel Jean 
Topic: JavaScript 
Overview:

I need a browser to call a function after someone is done resizing a browser window. The script I am using now is:

<script> function callHeightfinder() { self.location.href = 'index.cfm?mode=browserHeight'; } </scriptz7gt;

which is called by a onResize in the body tag. The problem with this script is that it calls the function as soon as the user starts to resize, I need it to call the function after the user has complete resizing the browser.

 

Cut Code:
I don't think you are going to have much luck finding the event you are
looking for. However, an alternative might be as follows:

Have a javascript function that fires every 3 seconds.
This function checks to see if the height and width have changes since the
initial load.
If either have changed, then you could load the page with the appropriate
URL variables.
It would look something like this:

<SCRIPT Language="JavaScript">
var InitialHeight = window.outerHeight;
var InitialWidth = window.outerWidth;
function checkForResize()
{
clearTimeout('ct');
if((InitialHeight != window.outerHeight)||
(InitialWidth != window.outerWidth))
{
self.location.href = 'index.cfm?mode=browserHeight';
}
ct = setTimeout('checkForResize()', 3000);
}
checkForResize();
</SCRIPT>