We help IT Professionals succeed at work.

onResize does this work in Netscape or others browsers

I have onResize in the body that executes a function which re allocates all my layer positions -- this is working in IE not in NN.

I mean to say when the window is resized the function is executed . this is working well n Ie why not in netscape? is the syntax ---- onResize="somefunction();" ---Only for Ie?? if so what should i do to get my function workin when the window is resized?? what is the alternative. Please help me . as my layer positions get worse when the window is resized.
Watch Question

You have to refresh the page in Netscape.....this page may be of some help to you:




My Frameset Page is refreshing each of the frame! ! my problem is solved if the Whole page is Reloaded. when i press the Reload button the thing is fine. But iF i just resize the layers arent positioning. plz help me
Top Expert 2005

Top Expert 2005
I got a nice resize-fix from Adobe Golive. It's called there Netscape-fix

Try to put this in:
CSInit = new Array;
function CSScriptInit() {
if(typeof(skipPage) != "undefined") { if(skipPage) return; }
idxArray = new Array;
for(var i=0;i<CSInit.length;i++)
        idxArray[i] = i;
CSAction2(CSInit, idxArray);}
CSStopExecution = false;
function CSAction(array) {
        return CSAction2(CSAct, array);
function CSAction2(fct, array) {
        var result;
        for (var i=0;i<array.length;i++) {
                if(CSStopExecution) return false;
                var actArray = fct[array[i]];
                if (actArray == null) return false;
                var tempArray = new Array;
                for(var j=1;j<actArray.length;j++) {
                        if((actArray[j] != null) && (typeof(actArray[j]) == "object") && (actArray[j].length == 2)) {
                                if(actArray[j][0] == "VAR") {
                                        tempArray[j] = CSStateArray[actArray[j][1]];
                                else {
                                        if(actArray[j][0] == "ACT") {
                                                tempArray[j] = CSAction(new Array(new String(actArray[j][1])));
                                        tempArray[j] = actArray[j];
                                tempArray[j] = actArray[j];
                result = actArray[0](tempArray);
        return result;
CSAct = new Object;

function CSFixFct() {
        var d = document; var w = window;
        if (d.cs.csFix.w != w.innerWidth || d.cs.csFix.h != w.innerHeight) {
                d.location = d.location; }
function CSNSFix(action) {
        var d = document; var w = window;
        if ((navigator.appName == 'Netscape') && (parseInt(navigator.appVersion) == 4)) {
                if (typeof d.cs == 'undefined') {
                        d.cs = new Object;
                        d.cs.csFix = new Object;
                } else if (CSIsFrame (w) == true) CSFixFct();
                d.cs.csFix.w = w.innerWidth;
                d.cs.csFix.h = w.innerHeight;
                window.onresize = CSFixFct;
function CSIsFrame (window) {
        var rootWindow = window.parent;
        if (rootWindow == 'undefined') return false;
        for (i = 0; i < rootWindow.frames.length; i++)
                if (window == rootWindow.frames[i]) return true;
        return false;
CSInit[CSInit.length] = new Array(CSNSFix);
// -->


<BODY onload="CSScriptInit();">


WEll nothing worked  !! i think ill Explain.

My Site has 3 frames. we can Consider the header frame the Options frame and the main frame. In my Options Frame there is a <div> layer which is a sliding Button that comes and sit to the bottom of the window and 50 pxls above that. This button isnt visible when the window is resized.For that in the <body> i have put <body onResize="resizeposition();"> this function reallocates the position of my buton. Now this is working in IE. But in NEtscape it isnt. Its like when u resize the window and reload the page the button is looking good in the position.But again when u resize the wiodow its not executing the onResize function. my Prob is my function has to work when the window is resized. Any simpler way to make me understand.???

Plz do so thanks a whole bunch.
Adios jay


So, you are saying that if the window is resize, the positioning will be out of line ... where you was actually calling resizeposition() function to do it if happen the window is resize, is this what you mean ? If this is, try to plug this code it, what does this code do is once you resize the window, it actually reload the pages ... as you mention if the window is reload once you resize the window to a smaller or wider positioning ...

<BODY onResize="window.location.href = window.location.href;">

Just a thought of it, hope it helps.

Good Luck.


Asta CuTechnical consultant & graphic design
Top Expert 2004

Please update the experts here who have so willingly stepped in to help you, since much time has passed since your last comments, and Email notifications may not have been generated to the participating experts here due to some problems at that time.  If you've been helped, accept the respective question by that expert to grade and close it.

Somewhat off-topic, but important.

****************************** ALERT********************************
WindowsUpdate - Critical Update alert March 28, 2002 from Microsoft
Microsoft Security Bulletin MS02-015  
28 March 2002 Cumulative Patch for Internet Explorer
Originally posted: March 28, 2002
Who should read this bulletin: Customers using Microsoft® Internet Explorer
Impact of vulnerability: Two vulnerabilities, the most serious of which would allow script to run in the Local Computer Zone.
Maximum Severity Rating: Critical
Recommendation: Consumers using the affected version of IE should install the patch immediately.
Affected Software:
Microsoft Internet Explorer 5.01
Microsoft Internet Explorer 5.5
Microsoft Internet Explorer 6.0

Thought you'd appreciate knowing this.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.