2 Replies Latest reply on Feb 17, 2010 1:53 PM by John Waller

    refresh page on resize

    LWAA Level 1

      I need to set my pages to reload/refresh when they're resized -- I'm using Project VII's Snap Layers to show a sub menu on mouseover of the main button. It works perfectly, except when you change the page size then the menu appears in the wrong place until you refresh the page. I'd like the page to refresh automatically when you resize the window. I've tried a sample I found online but even though it worked in the samples, it didn't work in my page. This example is below:

       

      in the body tag: onResize="window.location.href = window.location.href;"

       

      Any suggestions? My Body tag is already fairly busy:
      <BODY leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="P7_Snap('res','ressub',152,0);P7_setScroller('p7scroller1','p7s1content1',0,0);MM _preloadImages('../images/LAVENDER_17.gif','../images/LAVENDER_27.gif','../images/LAVENDER _28.gif','../images/LAVENDER_29.gif')">
      thanks in advance!
        • 1. Re: refresh page on resize
          whattevva

          My guess is that you have the drop down menu assigned with "absolute" positioning instead of "relative"... Absolute sets it at a specific x,y position from the left and top, whereas relative keeps its location relative to it's "parent", so when the parent link is moved as a result of the page resize, the sub-menu will move along with it.

           

          If you're still not sure, I understand Project VII has tech support in place to work with you on issues with their menu systems which may be more helpful than here as they've created the menu and would be more familiar with it's settings...

           

          Hope that helps,

          Jesse

          • 2. Re: refresh page on resize
            John Waller Adobe Community Professional & MVP

            I would suggest not using Snap Layers for this. Refreshing a page simply to re-align a dropdown menu is clunky to say the least.

             

            Try PVII's CSS Dropdown menu tutorial instead

            http://www.projectseven.com/tutorials/navigation/auto_hide/index.htm