Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 22
  1. #11
    Senior Member FZ's Avatar
    Join Date
    May 2003
    Location
    Johannesburg, South Africa
    Posts
    1,024

    Default

    Hmm, what Shawn suggested could work, maida - or you could use some code that will reload the page if the window is resized (and the browser is IE) - that way, the page will reload if the window is resized, and whatever images were already loaded would be pulled from cache, and the remainder would be preloaded like normal.
    Fayez Zaheer

  2. #12

    Default

    I'm sorry, I don't know how I would incorporate that script into my current script. Where would I put the call to it?

    Maida
    Affordable, Professional Websites
    www.Maida.Net

    Healthy Mind, Body and Soul
    www.TheHealthyMom.com

    Your Friendly Neighborhood Comic Store
    www.BargainComics.com

  3. #13
    Senior Member FZ's Avatar
    Join Date
    May 2003
    Location
    Johannesburg, South Africa
    Posts
    1,024

    Default

    Well, I don't know about the code that Shawn pasted (it is Netscape 4 specific), but you might want to try this to fix the bug (as it occurs for you, in IE only):

    In your existing code, look for function setouterpos() and add this line after the last one, which is perouter.style.visibility="visible"; - before the second-last }

    Code:
    top.location.reload();
    Keep in mind though that I just came up with that NOW, so it could be buggy... Testing is needed! Oh and was the person that reported infinite reloading using Netscape 4?
    Fayez Zaheer

  4. #14
    Moderator wildjokerdesign's Avatar
    Join Date
    Jun 2003
    Location
    Kansas City Mo
    Posts
    5,721

    Default

    Yes the code I posted is for NS 4. I thougth that was where the bug was. It can simply be pasted in to your head as a javascript and it works even tag it on to the end of what you have.
    Shawn
    Please remember your charity of choice: http://www.redcross.org

    Handy Links: wildjokerdesign.net | Plain Text Editors: EditPlus | Crimson

  5. #15

    Default

    FZ... I think I did something wrong...I added the line and then the page just continually reloaded. This is where I put it...

    Code:
    function setouterpos(){
    	var ww=(IE4)? document.body.clientWidth : window.innerWidth;
    	var x=(ww-barwidth)/2;
    	if(NS4){
    		perouter.moveTo(x,yposition);
    		perouter.visibility="show";
    	}
    	if(IE4||NS6){
    		perouter.style.left=x+'px';
    		perouter.style.top=yposition+'px';
    		perouter.style.visibility="visible";
    		top.location.reload();
    	}
    }
    Maida
    Affordable, Professional Websites
    www.Maida.Net

    Healthy Mind, Body and Soul
    www.TheHealthyMom.com

    Your Friendly Neighborhood Comic Store
    www.BargainComics.com

  6. #16

    Default

    Quote Originally Posted by wildjokerdesign
    Yes the code I posted is for NS 4. I thougth that was where the bug was. It can simply be pasted in to your head as a javascript and it works even tag it on to the end of what you have.
    Well, I can get it to stay on the page with IE6 on WinXP. I never heard back from the other person who saw the same problem to find out what browser/OS they were on.

    Thanks for the code, maybe I'll stick it in there just to be safe.

    Maida
    Affordable, Professional Websites
    www.Maida.Net

    Healthy Mind, Body and Soul
    www.TheHealthyMom.com

    Your Friendly Neighborhood Comic Store
    www.BargainComics.com

  7. #17

    Default

    Okay, so I tried adding an onresize to the body tag like so:

    Code:
    <body onresize="top.location.reload();" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0" bgcolor="#FFFFFF" background="images/nav/whiteswirl.gif" onload="loadimages();">
    and even

    Code:
    <body onresize="window.location.href = window.location.href;" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0" bgcolor="#FFFFFF" background="images/nav/whiteswirl.gif" onload="loadimages();">
    Here is what happens.
    I open the page and the progress bar comes and then goes and then the slideshow starts.

    So then I maximize the window and the progress bar re-appears and just stays on there and won't go away even though the slideshow is running.

    It happens in reverse as well. I open it in a maximized window, and it loads fine. When I try to resize it to a smaller size, the progress bar returns and then stays on the screen until I force a refresh.

    WEIRD!

    Maida
    Affordable, Professional Websites
    www.Maida.Net

    Healthy Mind, Body and Soul
    www.TheHealthyMom.com

    Your Friendly Neighborhood Comic Store
    www.BargainComics.com

  8. #18
    Moderator wildjokerdesign's Avatar
    Join Date
    Jun 2003
    Location
    Kansas City Mo
    Posts
    5,721

    Default

    Sounds like we need to rework that code I gave you to include more then just NS4 since when you refresh it works. That is what the NS4 code is doing automaticly when the window is resized. It is late now and can't think straight but will try to get back here tomarrow. Sorry I have not been around much but been real busy on another matter.
    Shawn
    Please remember your charity of choice: http://www.redcross.org

    Handy Links: wildjokerdesign.net | Plain Text Editors: EditPlus | Crimson

  9. #19
    Moderator wildjokerdesign's Avatar
    Join Date
    Jun 2003
    Location
    Kansas City Mo
    Posts
    5,721

    Default Ok what do you think of this.

    Instead of the DW code I gave I wonder if this would work. You would get rid of the code I gave you and replace it with this.

    Code:
    function fixBAR() {  //reloads the window if NS4 resized or hides the load bar if IE4 
    if (NS4){
    if (window.innerWidth != ww || window.innerHeight != wh){
    window.location.reload()
       }
      }
    if (IE4){
    if (document.body.clientWidth != ww || document.body.clientHeight != wh){
    perouter.style.visibility="hidden";
       }
      }
    }
    I figured we already know things like what browser type it is and we already had the original innerwidth of the page that we got when the function setouterpos() was called. Now the only other thing we need to change is this
    FIND:It is in setouterpos() funtion.
    Code:
    var ww=(IE4)? document.body.clientWidth : window.innerWidth;
    AFTER ADD
    Code:
    	var wh=(IE4)? document.body.clientHeight : window.innerHeight; //WJ ADD
    We now have a the original hieght set in variable wh wich I used in the fixBAR() function to run my check.

    The last thing that needs to happen is adding a this to your body tag:
    Code:
    onResize="fixBAR()"
    I think this works but not sure about all my logic. Any comments welcome
    Shawn
    Please remember your charity of choice: http://www.redcross.org

    Handy Links: wildjokerdesign.net | Plain Text Editors: EditPlus | Crimson

  10. #20

    Default

    This is so strange. Nothing is working and I believe it stems from the fact that the onResize attribute in the body tag is simply not being recognized.

    I did a simple <body onResize="alert('resize')"> and nothing happened when I resized the window.

    So, if the onResize attribute isn't working, the fix Shawn gave me won't work, and that is also why my attempts on force a reload when the window was resized aren't working.

    Why would this happen?

    Curiouser and curiouser...

    Well, at least it works for my client...maybe I have the buggy OS.

    Thanks so much Shawn for taking the time to write that...if only my browser would recognize the onresize attribute...

    Maida
    Affordable, Professional Websites
    www.Maida.Net

    Healthy Mind, Body and Soul
    www.TheHealthyMom.com

    Your Friendly Neighborhood Comic Store
    www.BargainComics.com

Similar Threads

  1. Unusual JavaScript behavior: document.lastModified
    By GerardTL in forum General Discussion
    Replies: 2
    Last Post: 06-30-2006, 12:47 PM
  2. Calling All HTML Experts!!!
    By ccwebb in forum General Discussion
    Replies: 6
    Last Post: 09-25-2003, 07:43 PM
  3. Time Zone Environment variable
    By owl1 in forum General Discussion
    Replies: 3
    Last Post: 05-28-2003, 12:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •