5 Replies Latest reply on Jan 17, 2009 1:07 AM by htmlnonpro

    open browser window in same location

    htmlnonpro
      I am using Dreamweaver CS3. I have photos opening up to their original size with the open browser window behavior. The problem I am having is that the new browser opens up bringing the main page back to the top with the new window at the top. How can I get is to open in the exact location where the photo is shown without bringing the main browser window to the top? Should I be doing something else beside using behaviors?
        • 1. Re: open browser window in same location
          Level 7


          > The problem I am having is that the new
          > browser opens up bringing the main page back to the top with the new window at
          > the top. How can I get is to open in the exact location where the photo is
          > shown without bringing the main browser window to the top?

          If the page with the link is jumping to the top, a guess would be you have
          used # as the null link? Which the browser sees as an empty anchor link.

          change the # to
          javascript:;

          --
          Alan
          Adobe Community Expert, dreamweaver

          http://www.adobe.com/communities/experts/



          • 2. Re: open browser window in same location
            Level 7
            "Alan" <please_dont_mail_me@example.com> wrote in message
            news:C596B4D8.31C779%please_dont_mail_me@example.com...
            >
            >
            >> The problem I am having is that the new
            >> browser opens up bringing the main page back to the top with the new
            >> window at
            >> the top. How can I get is to open in the exact location where the photo
            >> is
            >> shown without bringing the main browser window to the top?
            >
            > If the page with the link is jumping to the top, a guess would be you have
            > used # as the null link? Which the browser sees as an empty anchor link.
            >
            > change the # to
            > javascript:;

            It would be better to use an arbitrary string after the "#", making sure
            that that fragment identifier does *not* match a named anchor on the page.
            That way the document won't jump *and* won't freeze either; which can happen
            in IE6 when users click on links that have "javascript;" for href values.
            An even better approach of course would be to use a "real" href (what's
            loaded in the popup) with a "return false" statement...


            --
            Thierry | Adobe Community Expert | Articles and Tutorials ::
            http://www.TJKDesign.com/go/?0

            Spry Widgets | http://labs.adobe.com/technologies/spry/samples/ [click on
            "Widgets"]
            Spry Menu Bar samples |
            http://labs.adobe.com/technologies/spry/samples/menubar/MenuBarSample.html
            --

            • 3. Re: open browser window in same location
              htmlnonpro Level 1
              quote:

              Originally posted by: Newsgroup User
              "Alan" <please_dont_mail_me@example.com> wrote in message
              news:C596B4D8.31C779%please_dont_mail_me@example.com...
              >
              >
              >> The problem I am having is that the new
              >> browser opens up bringing the main page back to the top with the new
              >> window at
              >> the top. How can I get is to open in the exact location where the photo
              >> is
              >> shown without bringing the main browser window to the top?
              >
              > If the page with the link is jumping to the top, a guess would be you have
              > used # as the null link? Which the browser sees as an empty anchor link.
              >
              > change the # to
              > javascript:;

              It would be better to use an arbitrary string after the "#", making sure
              that that fragment identifier does *not* match a named anchor on the page.
              That way the document won't jump *and* won't freeze either; which can happen
              in IE6 when users click on links that have "javascript;" for href values.
              An even better approach of course would be to use a "real" href (what's
              loaded in the popup) with a "return false" statement...


              --
              Thierry | Adobe Community Expert | Articles and Tutorials ::
              http://www.TJKDesign.com/go/?0

              Spry Widgets | http://labs.adobe.com/technologies/spry/samples/ [click on
              "Widgets"]
              Spry Menu Bar samples |
              http://labs.adobe.com/technologies/spry/samples/menubar/MenuBarSample.html
              --




              Thanks for the responses. The java script command worked well. To avoid IE issues, I made the link like this: #!. That makes it pop up right there. The open browser command was done on the a tag for the image (the original # place holder). How would you use a "real" href with the return false command? Can you give me an example?

              Here is the html code:
              <a href="#!" onclick="MM_openBrWindow('assets/images/portfolio/halfup_48.jpg','halfup48','width=480,he ight=640')"><img src="assets/images/portfolio/halfup_48.jpg" alt="halfup48" width="135" height="203" /></a>

              M
              • 4. Re: open browser window in same location
                Level 7
                <a href="assets/images/portfolio/halfup_48.jpg"
                onclick="MM_openBrWindow('assets/images/portfolio/halfup_48.jpg','halfup48','wid
                th=480,height=640');return false"><img
                src="assets/images/portfolio/halfup_48.jpg"
                alt="halfup48" width="135" height="203" /></a>

                --


                E. Michael Brandt

                www.divahtml.com
                www.divahtml.com/products/scripts_dreamweaver_extensions.php
                Standards-compliant scripts and Dreamweaver Extensions

                www.valleywebdesigns.com/vwd_Vdw.asp
                JustSo PictureWindow
                JustSo PhotoAlbum, et alia

                --