19 Replies Latest reply on Oct 6, 2007 10:08 AM by Newsgroup_User

    Behaviors: Open Browser Window

    johnminoman
      I have several images placed on my page. I am adding the Open Browser Window Behavior to that when the small image is click it opens to a larger view of the image. That is all working fine, the problem is that each time you choose a image to get the larger view and then close the larger view you end up at the top of the original page. I want the user to be able to close the Open Browser Window and still be at the same location on the page they originally saw the smaller image on. This is a problem because the page is long and the user has to scroll way back down to resume from where they left off. I hope that makes sense to who ever reads this.

      thanks in advance if anybody responds. john mino
        • 1. Re: Behaviors: Open Browser Window
          Level 7
          I am guessing you have this for your links:

          <a href="#" onclick=openBrowserWindow("imagefile.gif",foo,bar);><click
          here</>

          or something like that.

          Change it to this instead:


          <a href="imagefile.gif"
          onclick=openBrowserWindow("imagefile.gif",foo,bar);return false><click
          here</>

          The # is making the page jump to the top. In the new format it will not
          jump, and will open the image in a new browser window even if the user
          has disabled javascript.

          --


          E. Michael Brandt

          www.divaHTML.com
          divaPOP : standards-compliant popup windows
          divaGPS : you-are-here menu highlighting
          divaFAQ : FAQ pages with pizazz

          www.valleywebdesigns.com
          JustSo PictureWindow
          JustSo PhotoAlbum

          --
          • 2. Re: Behaviors: Open Browser Window
            johnminoman Level 1
            E Michael, Thank you so much for responding. I see where the # sign would cause the problem. Being the village idiot I am perhaps you could adapt your solution to my code.

            <td><div align="right"><a href="#"><img src="Bonnavilla info for site/2007 Floor Plans/Double Section HUD Homes/alpine375x300/hardin.gif" width="375" height="212" border="0" onclick="MM_openBrWindow('Bonnavilla info for site/2007 Floor Plans/Double Section HUD Homes/750/hardin750x425.gif','hardin','width=750,height=425')" /></a></div></td>

            Thanks again
            • 3. Re: Behaviors: Open Browser Window
              Level 7
              Not Michael, but I channel him occasionally. Here's what he would say -

              <td><div align="right"><a href="#" onclick="MM_openBrWindow('Bonnavilla info
              for site/2007
              Floor Plans/Double Section HUD
              Homes/750/hardin750x425.gif','hardin','width=750,height=425');return
              false"><img src="Bonnavilla info for site/2007 Floor Plans/Double Section
              HUD Homes/alpine375x300/hardin.gif" width="375" height="212" border="0"
              /></a></div></td>

              I might add that he would caution you to remove spaces and all punctuation
              from your file/pathnames - it's just too dangerous on the web (well, you can
              leave underscores and hyphens in but nothing else).


              --
              Murray --- ICQ 71997575
              Adobe Community Expert
              (If you *MUST* email me, don't LAUGH when you do so!)
              ==================
              http://www.dreamweavermx-templates.com - Template Triage!
              http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
              http://www.dwfaq.com - DW FAQs, Tutorials & Resources
              http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
              ==================


              "johnminoman" <webforumsuser@macromedia.com> wrote in message
              news:fdug9s$kim$1@forums.macromedia.com...
              >E Michael, Thank you so much for responding. I see where the # sign would
              >cause
              > the problem. Being the village idiot I am perhaps you could adapt your
              > solution
              > to my code.
              >
              > <td><div align="right"><a href="#"><img src="Bonnavilla info for
              > site/2007
              > Floor Plans/Double Section HUD Homes/alpine375x300/hardin.gif" width="375"
              > height="212" border="0" onclick="MM_openBrWindow('Bonnavilla info for
              > site/2007
              > Floor Plans/Double Section HUD
              > Homes/750/hardin750x425.gif','hardin','width=750,height=425')"
              > /></a></div></td>
              >
              > Thanks again
              >


              • 4. Re: Behaviors: Open Browser Window
                Level 7
                "Murray *ACE*" <forums@HAHAgreat-web-sights.com> wrote in message
                news:fdui9p$mij$1@forums.macromedia.com...
                > Not Michael, but I channel him occasionally. Here's what he would say -
                >
                > <td><div align="right"><a href="#" onclick="MM_openBrWindow('Bonnavilla
                > info for site/2007
                > Floor Plans/Double Section HUD
                > Homes/750/hardin750x425.gif','hardin','width=750,height=425');return
                > false"><img src="Bonnavilla info for site/2007 Floor Plans/Double Section
                > HUD Homes/alpine375x300/hardin.gif" width="375" height="212" border="0"
                > /></a></div></td>
                >
                > I might add that he would caution you to remove spaces and all punctuation
                > from your file/pathnames - it's just too dangerous on the web (well, you
                > can leave underscores and hyphens in but nothing else).

                I think Michael was also suggesting to use the image SRC value as HREF value
                (rather than the "#"), so it would look like:

                <td><div align="right"><a href="'Bonnavilla info
                for site/2007 Floor Plans/Double Section HUD Homes/750/hardin750x425.gif'"
                onclick="MM_openBrWindow('Bonnavilla info
                for site/2007 Floor Plans/Double Section HUD
                Homes/750/hardin750x425.gif','hardin','width=750,height=425');return
                false"><img src="Bonnavilla info for site/2007 Floor Plans/Double Section
                HUD Homes/alpine375x300/hardin.gif" width="375" height="212" border="0"
                /></a></div></td>

                but as Murray says, it would be better to remove the whitespace from your
                paths.

                --
                Thierry
                Articles and Tutorials: http://www.TJKDesign.com/go/?0
                --
                http://www.divahtml.com/products/scripts_dreamweaver_extensions.php
                - divaGPS - Add "you are here" highlighting to virtually any menu
                - divaFAQ - Create FAQ pages that toggle (show/hide) the answers
                - divaPOP - Easy, clean, standards-compliant popup windows.

                • 5. Re: Behaviors: Open Browser Window
                  Level 7
                  Murray *ACE* wrote:
                  > Not Michael, but I channel him occasionally. Here's what he would say -

                  Odd thing. I felt a strange, alien presence dance through my very being
                  a few minutes ago. Must have been Murray.

                  --


                  E. Michael Brandt

                  www.divaHTML.com
                  divaPOP : standards-compliant popup windows
                  divaGPS : you-are-here menu highlighting
                  divaFAQ : FAQ pages with pizazz

                  www.valleywebdesigns.com
                  JustSo PictureWindow
                  JustSo PhotoAlbum

                  --
                  • 6. Re: Behaviors: Open Browser Window
                    Level 7
                    E Michael Brandt wrote:

                    > Odd thing. I felt a strange, alien presence dance through my very being
                    > a few minutes ago. Must have been Murray.
                    >

                    And then Thierry!

                    --


                    E. Michael Brandt

                    www.divaHTML.com
                    divaPOP : standards-compliant popup windows
                    divaGPS : you-are-here menu highlighting
                    divaFAQ : FAQ pages with pizazz

                    www.valleywebdesigns.com
                    JustSo PictureWindow
                    JustSo PhotoAlbum

                    --
                    • 7. Re: Behaviors: Open Browser Window
                      MyFriendGoo
                      Using Dreamweaver MX, and having the same problem. Only thing is, I am using the # sign so the arrow comes up and people know that they can click on it.

                      Please see here: http://www.worldofgranite.net//stones/granite.htm Yup, I know this thing is a mess. I'm having so many problems that I'm thinking of scrapping and starting over. But even if so, I'll need to know this. - Thanks in advance.
                      • 8. Re: Behaviors: Open Browser Window
                        johnminoman Level 1
                        I really appreciate the response I have received on this. Unfortunately I haven't gotten them to work yet. When I cut and paste Murray or Thierry's code the image becomes cracked (lost) and as MyFriendGoo mentions I also want the arrow to come up so people know to click on it.
                        Regardless of how this comes out I am now a fan of the Adobe User Forum and will keep plugging away at this.
                        many thanks,
                        • 9. Re: Behaviors: Open Browser Window
                          Level 7
                          MyFriendGoo wrote:

                          > Please see here: http://www.worldofgranite.net//stones/granite.htm Yup, I

                          Oh my, that is quite a page. It has FAR too many thumbs on it, so even
                          on my fast connection it took too long to load.

                          AS for your question, you would need to edit this:

                          <a href="#"
                          onclick="MM_openBrWindow('../stone%20popups/gold_fuji.htm','goldenfuji','width=500,height =450')">

                          to this:

                          <a href="../stone%20popups/gold_fuji.htm"
                          onclick="MM_openBrWindow(this.href,'stonesample','width=500,height=450');return
                          false">

                          Just so you know, you spent a huge amount of time and effort creating
                          all those zillion of popup pages. If only you had known about my DW
                          Extension, JustSo PhotoAlbum3 before you did all that. It would have
                          created all the thumbs for you, put them in a table, even added the
                          onclick behavior for you, *and* saved you from having to create even a
                          single page to popup. It creates the popups on the fly, sized properly
                          for each image. For unique captions you would add that text to each
                          thumb's behavior manually in the UI. Like I said, too bad you did not
                          know of this before.

                          So, make the edits I show above to each and every thumb and you'll get
                          it working.

                          Oh, I also changed the windowname attribute as there is no reason for
                          them to be unique in this setting and it'll save you tons of retyping.
                          This way you can simply copy paste this part into each link:


                          onclick="MM_openBrWindow(this.href,'stonesample','width=500,height=450');return
                          false">

                          OR, if you wish I'll show you how to use Find/Replace to do this last
                          part for you in mere moments (after you've moved the imagefilename to
                          the <a> tag's href attribute.)

                          Hope that helps.

                          --


                          E. Michael Brandt

                          www.divaHTML.com
                          divaPOP : standards-compliant popup windows
                          divaGPS : you-are-here menu highlighting
                          divaFAQ : FAQ pages with pizazz

                          www.valleywebdesigns.com
                          JustSo PictureWindow
                          JustSo PhotoAlbum

                          --
                          • 10. Re: Behaviors: Open Browser Window
                            Level 7
                            "johnminoman" <webforumsuser@macromedia.com> wrote in message
                            news:fdunb0$rf3$1@forums.macromedia.com...
                            >I really appreciate the response I have received on this. Unfortunately I
                            > haven't gotten them to work yet. When I cut and paste Murray or Thierry's
                            > code
                            > the image becomes cracked (lost) and as MyFriendGoo mentions I also want
                            > the

                            Do you have an URL we can look at?

                            > arrow to come up so people know to click on it.

                            What arrow?

                            --
                            Thierry
                            Articles and Tutorials: http://www.TJKDesign.com/go/?0
                            --
                            http://www.divahtml.com/products/scripts_dreamweaver_extensions.php
                            - divaGPS - Add "you are here" highlighting to virtually any menu
                            - divaFAQ - Create FAQ pages that toggle (show/hide) the answers
                            - divaPOP - Easy, clean, standards-compliant popup windows.

                            • 11. Re: Behaviors: Open Browser Window
                              Level 7
                              johnminoman wrote:
                              > I really appreciate the response I have received on this. Unfortunately I
                              > haven't gotten them to work yet. When I cut and paste Murray or Thierry's code
                              > the image becomes cracked (lost) and as MyFriendGoo mentions I also want the
                              > arrow to come up so people know to click on it.
                              > Regardless of how this comes out I am now a fan of the Adobe User Forum and
                              > will keep plugging away at this.
                              > many thanks,
                              >
                              If you mean by "arrow" the handcursor, it will indeed appear if you are
                              typing all this properly. As Thierry said, show us a url and we can get
                              you straightened out. Or he can, as I am going off to watch a movie....

                              --


                              E. Michael Brandt

                              www.divaHTML.com
                              divaPOP : standards-compliant popup windows
                              divaGPS : you-are-here menu highlighting
                              divaFAQ : FAQ pages with pizazz

                              www.valleywebdesigns.com
                              JustSo PictureWindow
                              JustSo PhotoAlbum

                              --
                              • 12. Re: Behaviors: Open Browser Window
                                johnminoman Level 1
                                here is a link to the page I'm having the problem with. Yes, I meant handcurser.

                                http://www.drivealittlesavealot.com/floor.html

                                I also just noticed that after I pick on a floorplan to enlarge it and then close the enlargement the URL on the page picks up a # symbol after the floor.html in the address bar?
                                I have only added the browser window behavior as far as the Harvard floor plan.

                                Any advice would be appreciated.

                                thanks once again,
                                • 13. Re: Behaviors: Open Browser Window
                                  MyFriendGoo Level 1

                                  E Michael Brandt wrote:

                                  Oh my, that is quite a page. It has FAR too many thumbs on it, so even
                                  on my fast connection it took too long to load.
                                  **********
                                  I knew there had to be a better way to do that! I really appreciate you bringing the extension to my attention, as the thumbnails will further be sorted in pages for "sort by color" and "sort by price." So even if (WHEN~!) I get this page functional, I'll have more of this type of page to make.

                                  Do you have any suggestions on how to reduce load time for the page? Due to the nature of the content nessesary I can't reduce the number of thumbnails on this "main" page which shows all the colors. Is there some type of image optimization? ( I'm willing to spend the time remaking the page if it works better. )

                                  I've been bashing my head on my keyboard all day with this site, and have got to take a break. ( Drop down menu pukefest - ugh. ) But, thanks for your help. I haven't done any web work for several years, and I feel like I'm completely living in the dark ages. So, I may be a little s-l-o-w, but I'll get it!

                                  • 14. Re: Behaviors: Open Browser Window
                                    Level 7
                                    "johnminoman" <webforumsuser@macromedia.com> wrote in message
                                    news:fdusu3$3j6$1@forums.macromedia.com...
                                    > here is a link to the page I'm having the problem with. Yes, I meant
                                    > handcurser.
                                    >
                                    > http://www.drivealittlesavealot.com/floor.html
                                    >
                                    > I also just noticed that after I pick on a floorplan to enlarge it and
                                    > then
                                    > close the enlargement the URL on the page picks up a # symbol after the
                                    > floor.html in the address bar?
                                    > I have only added the browser window behavior as far as the Harvard floor
                                    > plan.
                                    >
                                    > Any advice would be appreciated.

                                    You lost the A element somehow. So try the following:
                                    1. remove this for Hamilton:
                                    <a href="#">
                                    <img width="375" height="210" border="0"
                                    onclick="MM_openBrWindow('Bonnavilla info for site/2007 Floor Plans/Double
                                    Section HUD
                                    Homes/750/hamilton750x420.gif','hamilton','width=750,height=420')"
                                    src="Bonnavilla info for site/2007 Floor Plans/Double Section HUD
                                    Homes/alpine375x300/hamilton.gif"/>
                                    </a>

                                    2. replace it with the following:
                                    <a href="info for site/2007 Floor Plans/Double Section HUD
                                    Homes/750/hamilton750x420.gif" onclick="MM_openBrWindow('Bonnavilla info
                                    for site/2007 Floor Plans/Double Section HUD
                                    Homes/750/hamilton750x420.gif','hamilton','width=750,height=420');return
                                    false;" >
                                    <img width="375" height="210" border="0" src="Bonnavilla info for site/2007
                                    Floor Plans/Double Section HUD Homes/alpine375x300/hamilton.gif"/>
                                    </a>

                                    So in short:
                                    1. Move the onclick attribute (with its value) from the IMG element to the A
                                    element
                                    2. Add a "return false" statement as shown above
                                    3. Replace the "#" with the path to the larger image, the same path that
                                    shows after "MM_openBrWindow('"

                                    That should do it.

                                    --
                                    Thierry
                                    Articles and Tutorials: http://www.TJKDesign.com/go/?0
                                    --
                                    http://www.divahtml.com/products/scripts_dreamweaver_extensions.php
                                    - divaGPS - Add "you are here" highlighting to virtually any menu
                                    - divaFAQ - Create FAQ pages that toggle (show/hide) the answers
                                    - divaPOP - Easy, clean, standards-compliant popup windows.

                                    • 15. Re: Behaviors: Open Browser Window
                                      Level 7

                                      > Any advice would be appreciated.

                                      I did discovere one way to save LOTS of loadtime. I looked at two of
                                      your thumbnails and discovered that they were FAR larger than they are
                                      being displayed on your page.

                                      The thumbnails I looked at were 321x321 = 103k, and after I shrunk then
                                      down to their display size of 90x90 = 10k !!

                                      I would strongly urge you to reduce the image dimensions of the
                                      thumbnails. FW can do that in batch mode very easily. it'll save more
                                      than a megabyte of page weight with a huge improvement in loadtime.

                                      --


                                      E. Michael Brandt

                                      www.divaHTML.com
                                      divaPOP : standards-compliant popup windows
                                      divaGPS : you-are-here menu highlighting
                                      divaFAQ : FAQ pages with pizazz

                                      www.valleywebdesigns.com
                                      JustSo PictureWindow
                                      JustSo PhotoAlbum

                                      --
                                      • 16. Re: Behaviors: Open Browser Window
                                        Level 7
                                        John, you may want to look at the 4Level open browser ext. I've used it
                                        a lot with good results.
                                        http://www.fourlevel.com/extensions.htm

                                        Fred
                                        • 17. Re: Behaviors: Open Browser Window
                                          Level 7
                                          Hi,
                                          Change the "#" symbol for "javascript:;" this will fix your problem.

                                          "johnminoman" <webforumsuser@macromedia.com> escribió en el mensaje
                                          news:fducr2$h3a$1@forums.macromedia.com...
                                          > I have several images placed on my page. I am adding the Open
                                          > Browser
                                          > Window Behavior to that when the small image is click it opens to a larger
                                          > view
                                          > of the image. That is all working fine, the problem is that each time you
                                          > choose a image to get the larger view and then close the larger view you
                                          > end up
                                          > at the top of the original page. I want the user to be able to close the
                                          > Open
                                          > Browser Window and still be at the same location on the page they
                                          > originally
                                          > saw the smaller image on. This is a problem because the page is long and
                                          > the
                                          > user has to scroll way back down to resume from where they left off. I
                                          > hope
                                          > that makes sense to who ever reads this.
                                          >
                                          > thanks in advance if anybody responds. john mino
                                          >
                                          >


                                          • 18. Re: Behaviors: Open Browser Window
                                            johnminoman Level 1
                                            Thanks everybody for your help.

                                            Here is what I did to correct the problem. All Based on Thierry's instruction.
                                            1. I replaced the # in the link field to the actual image I wanted the Open Browser Window Behavior to display.
                                            2. I added ;return false; at the end of the HTML string governing that behavior.

                                            It WORKS!. The only thing that would make me happier is winning the lotto!

                                            E Michael I think the image size problem you are discussing actually belongs to "MyFriendGoo" and the "worldofgranite" site with all the thumbnails.

                                            Adobe User Forum Rocks! Peace
                                            • 19. Re: Behaviors: Open Browser Window
                                              Level 7
                                              "Miguel" <nose@aunmenos.com> wrote in message
                                              news:fdvr0h$56r$1@forums.macromedia.com...
                                              > Hi,
                                              > Change the "#" symbol for "javascript:;" this will fix your problem.

                                              But it creates a new one if JS is off.
                                              Besides that, IE freezes if the user clicks on such link before the page is
                                              done loading.

                                              This is a link to what I believe is the Cadillac of the "Open Browser
                                              Window" scripts/extensions:
                                              http://www.divahtml.com/products/divaPOP/open_popup_windows.php

                                              $9 cheaper is this free "DIY" (downsized) version:
                                              http://tjkdesign.com/articles/popup_window_with_no_extra_markup.asp

                                              --
                                              Thierry
                                              Articles and Tutorials: http://www.TJKDesign.com/go/?0
                                              --
                                              http://www.divahtml.com/products/scripts_dreamweaver_extensions.php
                                              - divaGPS - Add "you are here" highlighting to virtually any menu
                                              - divaFAQ - Create FAQ pages that toggle (show/hide) the answers
                                              - divaPOP - Easy, clean, standards-compliant popup windows.