Closed Thread Icon

Topic awaiting preservation: onresize = reload.. aaarghh.. (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=8189" title="Pages that link to Topic awaiting preservation: onresize = reload.. aaarghh.. (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: onresize = reload.. aaarghh.. <span class="small">(Page 1 of 1)</span>\

 
sonicsnail
Bipolar (III) Inmate

From: Scotland
Insane since: Jun 2001

posted posted 05-27-2002 17:32

Hi all,

I've created this site: http://www.makingsenseoflife.co.uk using the API from dansteinman.com/dynapi/

My problem is this: When you resize the browser, it reloads the page.. now I'm pretty sure this is required for NN4 to re-work the layers, but surely not for IE4+..??

How can I get round this?

many thanks in advance for your help,

Pete.



Yossi Admon
Bipolar (III) Inmate

From: Israel
Insane since: Nov 2001

posted posted 05-27-2002 19:01

Hi,
Same problem happened to me with NN6 when resizing frames (hide/show menu).

I have not found any solution for this problem.

Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 05-27-2002 19:07

I'm not sure if this is the answer to your question but this is what I use:

code:
// Netscape Resize Fix
if (document.layers) {
widthCheck = window.innerWidth;
heightCheck = window.innerHeight;
window.onResize = resizeFix;
}
function resizeFix() {
if (widthCheck != window.innerWidth &#0124; &#0124; heightCheck != window.innerHeight) {
document.location.href = document.location.href;
}
}



The important thing is the check to see if it is NS4.x otherwise it will just reload the page in any browser.

___________________
Emps

FAQs: Emperor

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 05-28-2002 08:21

makeLiquid() function in liquid.js file also includes IE in if statement, and that's why it reloads page in IE, too...

Original code:

function makeLiquid() {
if ((is.ns && (winW!=window.innerWidth &#0124; &#0124; winH!=window.innerHeight)) &#0124; &#0124; is.ie)
history.go(0)
}

Code without check fo IE:

function makeLiquid() {
if (is.ns && (winW!=window.innerWidth &#0124; &#0124; winH!=window.innerHeight))
history.go(0)
}

BTW DynAPI from Dan Steinman's web site is really old, you should take a look at new DynAPI2...


InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 05-28-2002 08:51

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

sonicsnail
Bipolar (III) Inmate

From: Scotland
Insane since: Jun 2001

posted posted 05-28-2002 13:32

Isn't converting to a new API going to be really time-intensive? - I'm hoping I don't have to take this code back to the drawing board...

::EDIT::

Also, Max, when I take the IE part out of that Function, it doesn't adjust the page onresize at all.... :-(



[This message has been edited by sonicsnail (edited 05-28-2002).]

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 05-28-2002 14:27

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

sonicsnail
Bipolar (III) Inmate

From: Scotland
Insane since: Jun 2001

posted posted 05-28-2002 16:45

Thanks guys for your help..

InI - don't worry about bitching - I'm *learning* from that scowl! I've looked at this 1K Api, and to be honest, its just confusing me... everything is SO abbreviated...

Max - I've also looked at the sourceforge Api - MUCH bigger than InI's example... but more self-expanatory I think (with a few hours to try to work out what's doing what through it's example pages..)

My Problem With Both Of These:

Is that having spent an hour looking at them, playing a little, and trying to figure them out, I CAN'T seem to see how to create a layer that is x pixels from the right/bottom of the browser window.. (and hopefully moves with browser resize without reloading!)... This is the whole point of needing this API..

can you explain some more? - maybe show me which functions I need to be concerned with...

I appreciate it,

Pete

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 05-28-2002 22:52

#thelayer {position:absolute; right:100px; bottom:100px;}

won't work in NN4.x, I'm sure.

sonicsnail
Bipolar (III) Inmate

From: Scotland
Insane since: Jun 2001

posted posted 05-29-2002 00:42

I'm sure you're right Slime.. thats why I'm trying to use these cross-browser API's.. I think...

sonicsnail
Bipolar (III) Inmate

From: Scotland
Insane since: Jun 2001

posted posted 05-31-2002 12:05

Can no-one help me further?

Pleaaase?



InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 05-31-2002 12:22

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

sonicsnail
Bipolar (III) Inmate

From: Scotland
Insane since: Jun 2001

posted posted 06-06-2002 12:13

just one final *bump*

Veneficuz
Paranoid (IV) Inmate

From: A graveyard of dreams
Insane since: Mar 2001

posted posted 06-06-2002 13:51
code:
newTop = screenHeight-obj.height-100;
newLeft = screenWidth-obj.width-100;


That should work if you just rewrite it to js-code. And then run those lines whenever the browser window is resized.


_________________________
Anyone who has lost track of time when using a computer knows the propensity to dream, the urge to make dreams come true and the tendency to miss lunch.
- copied from the wall of cell 408 -

[This message has been edited by Veneficuz (edited 06-06-2002).]

« BackwardsOnwards »

Show Forum Drop Down Menu