Highslide in Fire Fox

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mfaisalwarraich
    New Member
    • Oct 2007
    • 194

    Highslide in Fire Fox

    Hi Everybody,

    im using highslide to show images. i want page scroll if the highslide is activated like window.scroll(0 ,550). i used this code which works good in IE but not in FF. the following is the highslide code. please tell me how and where i can use window.scroll to make scroll page and when i close the highslide then page should go back to (0,0) position this is at the top. please help me out.

    here is code. this code is working perfectly but i want to scoll the page and then back to the top when highslide is closed.

    here is the JS file:

    Here is the HTML file:

    Code:
    <html><head>
    <script type="text/javascript" src="highslide/highslide-with-gallery.js"></script>
    <link rel="stylesheet" type="text/css" href="highslide/highslide.css" />
    
    <script type="text/javascript">
        hs.graphicsDir = 'highslide/graphics/';
        hs.align = 'center';
        hs.transitions = ['expand', 'crossfade'];
        hs.outlineType = 'glossy-dark';
        hs.wrapperClassName = 'dark';
        hs.fadeInOut = true;
        //hs.dimmingOpacity = 0.75;
    
        // Add the controlbar
        if (hs.addSlideshow) hs.addSlideshow({
            //slideshowGroup: 'group1',
            interval: 5000,
            repeat: false,
            useControls: true,
            fixedControls: 'fit',
            overlayOptions: {
                opacity: .6,
                position: 'bottom center',
                hideOnMouseOut: true
                
            }
        });
    </script>
    <title></title>
    </head>
    <body>
     <TABLE style="BORDER-RIGHT: #cccccc 1px solid; BORDER-TOP: #cccccc 1px solid; BORDER-LEFT: #cccccc 1px solid; BORDER-BOTTOM: #cccccc 1px solid" cellSpacing=0 cellPadding=0 width=205 border=0>
        <TBODY>
                                    <TR>
                                    <TD bgColor=#f7f7f7 
                                    height=175><a href="http://bytes.com/images/print-design/full-logo/logo2(35mm).jpg" class="highslide" onClick="return hs.expand(this)"><img src="http://bytes.com/images/print-design/logo2(35mm).jpg"
            title="Click to enlarge" /></a></TD>
                                    </TR></TBODY></TABLE>
    </body></html>
    im sorry i forget how to write code into its format. please i request to the administration of this site to do this for me and tell me how i can write in proper formating. thanking u.
    Last edited by acoder; Jan 12 '09, 09:39 PM. Reason: Added [code] tags
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    Use the window.scrollTo method. You can use it in the close() method.

    Comment

    • mfaisalwarraich
      New Member
      • Oct 2007
      • 194

      #3
      using it in close() method means scrolling only when close method is called. i want to scroll the page when highslide is activated and then scroll back to top when it is closed. for close it is ok but how i can use window.scrollTo () when highslide is activated. thank u.

      Comment

      • acoder
        Recognized Expert MVP
        • Nov 2006
        • 16032

        #4
        In that case, init() is what you're looking for.

        btw, there was no need to post all of the code. A link to the source code would've been enough.

        Comment

        • mfaisalwarraich
          New Member
          • Oct 2007
          • 194

          #5
          placing window.scrollTo () into init() method making scroll when page is loaded. this is what i dont want. i want to scroll it when highslide activated not initialized. plz tell me how i can do this.

          thank u.

          Comment

          • acoder
            Recognized Expert MVP
            • Nov 2006
            • 16032

            #6
            Check the Highslide JS API Reference - there's an onActivate event.

            Comment

            • mfaisalwarraich
              New Member
              • Oct 2007
              • 194

              #7
              thank you for reference website. but im sorry i dont understand how to use hs.onActivate event there. how i can use it? would u please help me with some code? at the reference website uner onActivate event there is a little code which is defined in the head of the html page then how i can call that function? cuz im calling this <a href="images/web/full-web/web-1.gif" class="highslid e" onClick="return hs.expand(this) "><img src="images/web/web-1.jpg" title="Click to enlarge" /></a> when image is clicked. please tell me. i will be grateful to you.

              thank you.

              Comment

              • acoder
                Recognized Expert MVP
                • Nov 2006
                • 16032

                #8
                I'm not sure what the problem is. In Highslide JS API Reference : hs.onActivate, the example is quite clear. Just add it in the head after including the highslide.js file.

                Comment

                • mfaisalwarraich
                  New Member
                  • Oct 2007
                  • 194

                  #9
                  im sorry im bothering you again and again. but its not working for me. like this is the head section of my html page:

                  Code:
                  <script type="text/javascript" src="highslide/highslide-with-gallery.js"> </script>
                  <script type="text/javascript">
                  hs.onActivate = function() {
                  window.scrollTo(0,550);
                  }
                  </script>
                  
                  
                  
                  <script type="text/javascript">
                      hs.graphicsDir = 'highslide/graphics/';
                      hs.align = 'bottom';
                      hs.transitions = ['expand', 'crossfade'];
                      hs.wrapperClassName = 'dark borderless floating-caption';
                      hs.fadeInOut = true;
                      hs.dimmingOpacity = .75;
                      
                      // Add the controlbar
                      if (hs.addSlideshow) hs.addSlideshow({
                          //slideshowGroup: 'group1',
                          interval: 5000,
                          repeat: false,
                          useControls: true,
                          fixedControls: 'fit',
                          overlayOptions: {
                              opacity: .6,
                              position: 'bottom center',
                              hideOnMouseOut: true
                          }
                      });
                      
                  </script>
                  please tell me what should i do now?

                  thank u.
                  Last edited by acoder; Jan 15 '09, 01:11 PM. Reason: Please use [code] tags! There's no excuse!

                  Comment

                  • acoder
                    Recognized Expert MVP
                    • Nov 2006
                    • 16032

                    #10
                    So the Highslide works, but it's just the scrolling that doesn't? Try an alert on the activate event to check that it fires.

                    PS. please use [code] tags when posting code. You should know better now.

                    Comment

                    Working...