Centering a PopUp Window Help

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Applebrownbetty

    Centering a PopUp Window Help

    Hi,

    I'd like to append/amend the following code from the Dreamweaver extension
    "Open Picture Window Fever" for the ability to center the PopUp window:

    By default, it allows the window to be offset on the left and top, but does
    not include a centering option.

    I'm thinking it would include something like (screen.width-imageWidth)/2;
    somewhere but not sure how do go about doing this.

    Thanks for any help!

    ______________
    function
    openPictureWind ow_Fever(imageT ype,imageName,i mageWidth,image Height,alt,posL e
    ft,posTop) { // v4.01

    newWindow =
    window.open("", "newWindow","wi dth="+imageWidt h+",height="+im ageHeight+",scr o
    llbars=no,left= "+posLeft+",top ="+posTop);
    newWindow.docum ent.open();
    newWindow.docum ent.write('<htm l><title>'+alt+ '</title><body
    bgcolor="#FFFFF F" leftmargin="0" topmargin="0" marginheight="0 "
    marginwidth="0" onBlur="self.cl ose()">');

    if (imageType == "swf"){
    newWindow.docum ent.write('<obj ect
    classid=\"clsid :D27CDB6E-AE6D-11cf-96B8-444553540000\"
    codebase=\"http ://download.macrom edia.com/pub/shockwave/cabs/flash/swflash.c
    ab#version=5,0, 0,0\" width=\"'+image Width+'\" height=\"'+imag eHeight+'\">');
    newWindow.docum ent.write('<par am name=movie value=\"'+image Name+'\"><param
    name=quality value=high>');
    newWindow.docum ent.write('<emb ed src=\"'+imageNa me+'\" quality=high
    pluginspage=\"h ttp://www.macromedia. com/shockwave/download/index.cgi?P1_Pr od
    _Version=Shockw aveFlash\" type=\"applicat ion/x-shockwave-flash\"
    width=\"'+image Width+'\" height=\"'+imag eHeight+'\">');
    newWindow.docum ent.write('</embed></object>'); }else{
    newWindow.docum ent.write('<img src=\"'+imageNa me+'\" width='+imageWi dth+'
    height='+imageH eight+' alt=\"'+alt+'\" >'); }
    newWindow.docum ent.write('</body></html>');
    newWindow.docum ent.close();
    newWindow.focus ();
    }


  • Randy Webb

    #2
    Re: Centering a PopUp Window Help

    Applebrownbetty wrote:
    [color=blue]
    > Hi,
    >
    > I'd like to append/amend the following code from the Dreamweaver extension
    > "Open Picture Window Fever" for the ability to center the PopUp window:[/color]

    Ditch it and start over.
    [color=blue]
    > By default, it allows the window to be offset on the left and top, but does
    > not include a centering option.[/color]

    Nah, it just thinks it can offset windows on my PC.
    [color=blue]
    > I'm thinking it would include something like (screen.width-imageWidth)/2;
    > somewhere but not sure how do go about doing this.[/color]

    First, ask yourself what makes anybody think that I want a popup window
    that is in the center of my desktop? My desktop is 2560 pixels wide, so
    the popup window would sit (or attempt to sit) in between the two monitors.

    Open a window, let the *user* decide where to put it.


    --
    Randy
    comp.lang.javas cript FAQ - http://jibbering.com/faq

    Comment

    • David Dorward

      #3
      Re: Centering a PopUp Window Help

      Randy Webb wrote:
      [color=blue]
      > Open a window, let the *user* decide where to put it.[/color]

      Well, open a window[1], then let the user's probably-pretty-reasonable
      window manager deal with it (and let the user move it from there if they
      like)


      [1] Or don't - thanks to popup blockers and people simply training
      themselves to hit the X before the content loads, they aren't exactly
      effective these days.

      --
      David Dorward <http://blog.dorward.me .uk/> <http://dorward.me.uk/>
      Home is where the ~/.bashrc is

      Comment

      • Applebrownbetty

        #4
        Re: Centering a PopUp Window Help

        "Randy Webb" <HikksNotAtHome @aol.com> wrote in message
        news:5Pednc_qKo 9e7hvcRVn-pg@comcast.com. ..[color=blue]
        > Applebrownbetty wrote:
        >[color=green]
        > > Hi,
        > >
        > > I'd like to append/amend the following code from the Dreamweaver[/color][/color]
        extension[color=blue][color=green]
        > > "Open Picture Window Fever" for the ability to center the PopUp window:[/color]
        >
        > Ditch it and start over.[/color]

        Why?
        [color=blue]
        >[color=green]
        > > By default, it allows the window to be offset on the left and top, but[/color][/color]
        does[color=blue][color=green]
        > > not include a centering option.[/color]
        >
        > Nah, it just thinks it can offset windows on my PC.[/color]

        Obviously you mean something here... but lack the time/energy/patience to
        write it outright (in which case you shouldn't have posted it), so I'll skip
        it.

        [color=blue][color=green]
        > > I'm thinking it would include something like[/color][/color]
        (screen.width-imageWidth)/2;[color=blue][color=green]
        > > somewhere but not sure how do go about doing this.[/color]
        >[/color]
        [color=blue]
        > First, ask yourself what makes anybody think that I want a popup window
        > that is in the center of my desktop?[/color]

        My answer is that it is an enlarged thumbnail image, and on a big desktop it
        would mean less mouse movement if it were near the center where the
        thumbnails are as opposed to the left corner where most of them popup.
        [color=blue]
        > My desktop is 2560 pixels wide, so
        > the popup window would sit (or attempt to sit) in between the two[/color]
        monitors.

        And the percentage of people in your situation is? Right, less than 0.5% I'd
        guess. This might be a problem if you weren't able to move it yourself...
        but even if it was in the center, you could.
        [color=blue]
        > Open a window, let the *user* decide where to put it.[/color]

        Whether it opens in the top left or center, it does let the user decide
        where to put it, since it's movable. I aim to create the least frustration
        for the user. When they click on an image and it pops up nearby, that's more
        user friendly and looks better IMO than an image on the top left of the big
        monitor. It's framed nicer.

        [color=blue]
        >
        > --
        > Randy
        > comp.lang.javas cript FAQ - http://jibbering.com/faq[/color]


        Comment

        • Michael Winter

          #5
          Re: Centering a PopUp Window Help

          On Mon, 01 Nov 2004 19:24:02 GMT, Applebrownbetty
          <applebrown@del etethisspace_ga mebanshee.com> wrote:
          [color=blue]
          > "Randy Webb" <HikksNotAtHome @aol.com> wrote in message
          > news:5Pednc_qKo 9e7hvcRVn-pg@comcast.com. ..[/color]

          [snip]
          [color=blue][color=green]
          >> Ditch it and start over.[/color]
          >
          > Why?[/color]

          Most code produced by Dreamweaver is, quite frankly, crap. This extension,
          included.

          [ABB:][color=blue][color=green][color=darkred]
          >>> By default, it allows the window to be offset on the left and top, but
          >>> does not include a centering option.[/color]
          >>
          >> Nah, it just thinks it can offset windows on my PC.[/color]
          >
          > Obviously you mean something here... but lack the time/energy/patience
          > to write it outright [...][/color]

          I think the meaning is fairly explicit. The code attempts to position the
          window, but it may not succeed. After all, browsers do allow the user to
          override certain script actions.

          [snip]
          [color=blue]
          > My answer is that it is an enlarged thumbnail image, and on a big
          > desktop it would mean less mouse movement if it were near the center
          > where the thumbnails are as opposed to the left corner where most of
          > them popup.[/color]

          As Randy has demonstrated, it will *force* extra mouse movement for a
          proportion of users.
          [color=blue][color=green]
          >> My desktop is 2560 pixels wide, so the popup window would sit (or
          >> attempt to sit) in between the two monitors.[/color]
          >
          > And the percentage of people in your situation is?[/color]

          It doesn't really matter. From my experience, if the window manager
          positions it, it will be placed in (generally) a predictable position in
          the most applicable monitor. If you position it, it may be placed where
          the user expects it, or somewhere inappropriate. So, a sensible place 100%
          of the time, or an awkward place some of the time? I know what would be
          the logical answer to that.

          [snip]
          [color=blue]
          > I aim to create the least frustration for the user.[/color]

          As I hope I've just made clear, leaving the decision to the operating
          system will create the least frustration. Of course, not forcing a new
          window upon the user in the first place is truly in the user's best
          interests.

          [snip]

          Mike

          --
          Michael Winter
          Replace ".invalid" with ".uk" to reply by e-mail.

          Comment

          • Mick White

            #6
            Re: Centering a PopUp Window Help

            Michael Winter wrote:
            [color=blue]
            >
            > Most code produced by Dreamweaver is, quite frankly, crap. This
            > extension, included.[/color]

            This isn't produced by DW, it's the work of a third party developer.
            Mick

            Comment

            • Randy Webb

              #7
              Re: Centering a PopUp Window Help

              Applebrownbetty wrote:
              [color=blue]
              > "Randy Webb" <HikksNotAtHome @aol.com> wrote in message
              > news:5Pednc_qKo 9e7hvcRVn-pg@comcast.com. ..
              >[color=green]
              >>Applebrownbet ty wrote:
              >>
              >>[color=darkred]
              >>>Hi,
              >>>
              >>>I'd like to append/amend the following code from the Dreamweaver[/color][/color]
              >
              > extension
              >[color=green][color=darkred]
              >>>"Open Picture Window Fever" for the ability to center the PopUp window:[/color]
              >>
              >>Ditch it and start over.[/color]
              >
              >
              > Why?[/color]

              Because every single snippet of DW generated code I have ever read is
              utter junk and can be re-written to be more readable, more predictable,
              and less error-prone.
              [color=blue]
              >[color=green][color=darkred]
              >>>By default, it allows the window to be offset on the left and top, but[/color][/color]
              >
              > does
              >[color=green][color=darkred]
              >>>not include a centering option.[/color]
              >>
              >>Nah, it just thinks it can offset windows on my PC.[/color]
              >
              >
              > Obviously you mean something here... but lack the time/energy/patience to
              > write it outright (in which case you shouldn't have posted it), so I'll skip
              > it.[/color]

              No need to skip it. I will explain what isn't obvious to you. You can't
              specify where to open a window on my computer because I have explicitly
              disabled it. I have my windows where *I* want them, and thats where they
              will open.
              [color=blue]
              >
              >[color=green][color=darkred]
              >>>I'm thinking it would include something like[/color][/color]
              >
              > (screen.width-imageWidth)/2;
              >[color=green][color=darkred]
              >>>somewhere but not sure how do go about doing this.[/color]
              >>[/color]
              >[color=green]
              >>First, ask yourself what makes anybody think that I want a popup window
              >>that is in the center of my desktop?[/color]
              >
              >
              > My answer is that it is an enlarged thumbnail image, and on a big desktop it
              > would mean less mouse movement if it were near the center where the
              > thumbnails are as opposed to the left corner where most of them popup.[/color]

              So you think that opening a window where the user is not used to it
              being opened is advantageous? I don't.
              [color=blue]
              >[color=green]
              >>My desktop is 2560 pixels wide, so
              >>the popup window would sit (or attempt to sit) in between the two[/color]
              >
              > monitors.
              >
              > And the percentage of people in your situation is? Right, less than 0.5% I'd
              > guess. This might be a problem if you weren't able to move it yourself...
              > but even if it was in the center, you could.[/color]

              It can't be opened in the center but thats irrelevant. Let it open where
              the user is accustomed to it opening and it totally removes your "problem".
              [color=blue]
              >[color=green]
              >>Open a window, let the *user* decide where to put it.[/color]
              >
              >
              > Whether it opens in the top left or center, it does let the user decide
              > where to put it, since it's movable. I aim to create the least frustration
              > for the user. When they click on an image and it pops up nearby, that's more
              > user friendly and looks better IMO than an image on the top left of the big
              > monitor. It's framed nicer.[/color]

              So its more "user friendly" to open a window where they don't expect it?
              I think not.

              --
              Randy
              comp.lang.javas cript FAQ - http://jibbering.com/faq

              Comment

              • Applebrownbetty

                #8
                Re: Centering a PopUp Window Help


                "Michael Winter" <M.Winter@bluey onder.co.invali d> wrote in message
                news:opsgs0utmv x13kvk@atlantis ...[color=blue]
                > On Mon, 01 Nov 2004 19:24:02 GMT, Applebrownbetty
                > <applebrown@del etethisspace_ga mebanshee.com> wrote:
                >[color=green]
                > > "Randy Webb" <HikksNotAtHome @aol.com> wrote in message
                > > news:5Pednc_qKo 9e7hvcRVn-pg@comcast.com. ..[/color]
                >
                > [snip]
                >[color=green][color=darkred]
                > >> Ditch it and start over.[/color]
                > >
                > > Why?[/color]
                >
                > Most code produced by Dreamweaver is, quite frankly, crap. This extension,
                > included.[/color]

                That really didn't answer my question about this particular bit of code.
                [color=blue]
                >
                > [ABB:][color=green][color=darkred]
                > >>> By default, it allows the window to be offset on the left and top, but
                > >>> does not include a centering option.
                > >>
                > >> Nah, it just thinks it can offset windows on my PC.[/color]
                > >
                > > Obviously you mean something here... but lack the time/energy/patience
                > > to write it outright [...][/color]
                >
                > I think the meaning is fairly explicit. The code attempts to position the
                > window, but it may not succeed. After all, browsers do allow the user to
                > override certain script actions.
                >
                > [snip]
                >[color=green]
                > > My answer is that it is an enlarged thumbnail image, and on a big
                > > desktop it would mean less mouse movement if it were near the center
                > > where the thumbnails are as opposed to the left corner where most of
                > > them popup.[/color]
                >
                > As Randy has demonstrated, it will *force* extra mouse movement for a
                > proportion of users.
                >[color=green][color=darkred]
                > >> My desktop is 2560 pixels wide, so the popup window would sit (or
                > >> attempt to sit) in between the two monitors.[/color]
                > >
                > > And the percentage of people in your situation is?[/color]
                >
                > It doesn't really matter. From my experience, if the window manager
                > positions it, it will be placed in (generally) a predictable position in
                > the most applicable monitor. If you position it, it may be placed where
                > the user expects it, or somewhere inappropriate. So, a sensible place 100%
                > of the time, or an awkward place some of the time? I know what would be
                > the logical answer to that.[/color]

                What it comes down to is that you're saying 99% of the people who use window
                positioning should not be. I don't agree. Let the operating system become
                more reliable. I'll chance it for the few it doesn't work for. If it looks
                really good for 99% of the people as opposed to "is functional" for 100% of
                the people, I'll choose the former.
                [color=blue]
                > [snip]
                >[color=green]
                > > I aim to create the least frustration for the user.[/color]
                >
                > Of course, not forcing a new
                > window upon the user in the first place is truly in the user's best
                > interests.[/color]

                Who said anything about forcing? These are thumbnails. If they want to view
                a larger image, it's their choice. Besides, most people are familiar with
                maneuvering windows that they decide to open... hence the operating system
                name.


                Comment

                • Applebrownbetty

                  #9
                  Re: Centering a PopUp Window Help

                  "Randy Webb" <HikksNotAtHome @aol.com> wrote in message
                  news:rMqdnZlNN7 KunxrcRVn-iA@comcast.com. ..[color=blue]
                  > Applebrownbetty wrote:
                  >[color=green]
                  > > "Randy Webb" <HikksNotAtHome @aol.com> wrote in message
                  > > news:5Pednc_qKo 9e7hvcRVn-pg@comcast.com. ..
                  > >[color=darkred]
                  > >>Applebrownbet ty wrote:
                  > >>
                  > >>
                  > >>>Hi,
                  > >>>
                  > >>>I'd like to append/amend the following code from the Dreamweaver[/color]
                  > >
                  > > extension
                  > >[color=darkred]
                  > >>>"Open Picture Window Fever" for the ability to center the PopUp window:
                  > >>
                  > >>Ditch it and start over.[/color]
                  > >
                  > >
                  > > Why?[/color]
                  >
                  > Because every single snippet of DW generated code I have ever read is
                  > utter junk and can be re-written to be more readable, more predictable,
                  > and less error-prone.
                  >[color=green]
                  > >[color=darkred]
                  > >>>By default, it allows the window to be offset on the left and top, but[/color]
                  > >
                  > > does
                  > >[color=darkred]
                  > >>>not include a centering option.
                  > >>
                  > >>Nah, it just thinks it can offset windows on my PC.[/color]
                  > >
                  > >
                  > > Obviously you mean something here... but lack the time/energy/patience[/color][/color]
                  to[color=blue][color=green]
                  > > write it outright (in which case you shouldn't have posted it), so I'll[/color][/color]
                  skip[color=blue][color=green]
                  > > it.[/color]
                  >
                  > No need to skip it. I will explain what isn't obvious to you. You can't
                  > specify where to open a window on my computer because I have explicitly
                  > disabled it. I have my windows where *I* want them, and thats where they
                  > will open.
                  >[color=green]
                  > >
                  > >[color=darkred]
                  > >>>I'm thinking it would include something like[/color]
                  > >
                  > > (screen.width-imageWidth)/2;
                  > >[color=darkred]
                  > >>>somewhere but not sure how do go about doing this.
                  > >>[/color]
                  > >[color=darkred]
                  > >>First, ask yourself what makes anybody think that I want a popup window
                  > >>that is in the center of my desktop?[/color]
                  > >
                  > >
                  > > My answer is that it is an enlarged thumbnail image, and on a big[/color][/color]
                  desktop it[color=blue][color=green]
                  > > would mean less mouse movement if it were near the center where the
                  > > thumbnails are as opposed to the left corner where most of them popup.[/color]
                  >
                  > So you think that opening a window where the user is not used to it
                  > being opened is advantageous? I don't.[/color]

                  And I agree with you. However, your implication that having a window open in
                  the center is "unfamiliar " to users is false in my opinion. If anything, it
                  is more plainly seen and not overlooked, which, if they bother clicking on a
                  thumbnail, IS advantageous.
                  [color=blue][color=green]
                  > >[color=darkred]
                  > >>My desktop is 2560 pixels wide, so
                  > >>the popup window would sit (or attempt to sit) in between the two[/color]
                  > >
                  > > monitors.
                  > >
                  > > And the percentage of people in your situation is? Right, less than 0.5%[/color][/color]
                  I'd[color=blue][color=green]
                  > > guess. This might be a problem if you weren't able to move it[/color][/color]
                  yourself...[color=blue][color=green]
                  > > but even if it was in the center, you could.[/color]
                  >
                  > It can't be opened in the center but thats irrelevant. Let it open where
                  > the user is accustomed to it opening and it totally removes your[/color]
                  "problem".

                  Not really. My "problem" was aesthetic (which as we all know is subjective
                  so please don't try and argue which way is better aesthetically) combined
                  with functionality. My last paragraph states what I was looking for.
                  [color=blue][color=green]
                  > >[color=darkred]
                  > >>Open a window, let the *user* decide where to put it.[/color]
                  > >
                  > >
                  > > Whether it opens in the top left or center, it does let the user decide
                  > > where to put it, since it's movable. I aim to create the least[/color][/color]
                  frustration[color=blue][color=green]
                  > > for the user. When they click on an image and it pops up nearby, that's[/color][/color]
                  more[color=blue][color=green]
                  > > user friendly and looks better IMO than an image on the top left of the[/color][/color]
                  big[color=blue][color=green]
                  > > monitor. It's framed nicer.[/color]
                  >
                  > So its more "user friendly" to open a window where they don't expect it?
                  > I think not.[/color]

                  See above.


                  Comment

                  • Michael Winter

                    #10
                    Re: Centering a PopUp Window Help

                    On Tue, 02 Nov 2004 04:41:34 GMT, Applebrownbetty
                    <applebrown@del etethisspace_ga mebanshee.com> wrote:

                    [snip]
                    [color=blue]
                    > If it looks really good for 99% of the people as opposed to "is
                    > functional" for 100% of the people, I'll choose the former.[/color]

                    You quoted the main point of my post (below), yet you seem to ignore it.
                    Most people do not like new windows, no matter where they are positioned.
                    Years of abuse have turned them into things of irritation, and
                    irrespective of that fact, they aren't viewed as the most user-friendly
                    feature.

                    [snip]
                    [color=blue][color=green]
                    >> Of course, not forcing a new window upon the user in the first place is
                    >> truly in the user's best interests.[/color]
                    >
                    > Who said anything about forcing?[/color]

                    You did, the moment you started opening new windows. If the user wants to
                    view the image, you are forcing them to see it in a new window. Whether
                    the user might want that or not, they have no choice in the matter. Your
                    alternative, don't view the image, is hardly useful, is it.

                    Every graphical browser I have ever used[1] allows the user to open any
                    link in a new window. Modern browsers make this very simple for users with
                    three-button mice. It's not like you're providing something that browsers
                    can't do themselves.

                    [snip]

                    Mike


                    [1] I can think of seven by name.

                    --
                    Michael Winter
                    Replace ".invalid" with ".uk" to reply by e-mail.

                    Comment

                    • Applebrownbetty

                      #11
                      Re: Centering a PopUp Window Help


                      "Michael Winter" <M.Winter@bluey onder.co.invali d> wrote in message
                      [color=blue]
                      > Most people do not like new windows, no matter where they are positioned.
                      > Years of abuse have turned them into things of irritation, and
                      > irrespective of that fact, they aren't viewed as the most user-friendly
                      > feature.[/color]

                      And what source do you have for "most people do not like new windows"? Most
                      people I'd wager are still used to thumbnails opening up, no? That is the
                      essense of this thread, so if you're talking generalities, it's off topic.
                      [color=blue]
                      > [snip]
                      >[color=green][color=darkred]
                      > >> Of course, not forcing a new window upon the user in the first place is
                      > >> truly in the user's best interests.[/color]
                      > >
                      > > Who said anything about forcing?[/color]
                      >
                      > You did, the moment you started opening new windows. If the user wants to
                      > view the image, you are forcing them to see it in a new window.[/color]

                      And if you put them inline with CSS, your "forcing" them to download the
                      larger picture right? Which is preferable? Either way, you're "forcing" the
                      viewer to view the page how you want them to, the moment you start writing
                      HTML.
                      [color=blue]
                      > Whether
                      > the user might want that or not, they have no choice in the matter. Your
                      > alternative, don't view the image, is hardly useful, is it.
                      >
                      > Every graphical browser I have ever used[1] allows the user to open any
                      > link in a new window.[/color]

                      Again, we are talking about thumbnails. See above.


                      Comment

                      • Randy Webb

                        #12
                        Re: Centering a PopUp Window Help

                        Applebrownbetty wrote:[color=blue]
                        > "Randy Webb" <HikksNotAtHome @aol.com> wrote in message
                        > news:rMqdnZlNN7 KunxrcRVn-iA@comcast.com. ..
                        >[color=green]
                        >>Applebrownbet ty wrote:
                        >>[color=darkred]
                        >>>
                        >>>>>I'm thinking it would include something like
                        >>>
                        >>>(screen.widt h-imageWidth)/2;
                        >>>
                        >>>
                        >>>>>somewher e but not sure how do go about doing this.
                        >>>>
                        >>>>First, ask yourself what makes anybody think that I want a popup window
                        >>>>that is in the center of my desktop?
                        >>>
                        >>>
                        >>>My answer is that it is an enlarged thumbnail image, and on a big desktop it
                        >>>would mean less mouse movement if it were near the center where the
                        >>>thumbnails are as opposed to the left corner where most of them popup.[/color]
                        >>
                        >>So you think that opening a window where the user is not used to it
                        >>being opened is advantageous? I don't.[/color]
                        >
                        >
                        > And I agree with you. However, your implication that having a window open in
                        > the center is "unfamiliar " to users is false in my opinion. If anything, it
                        > is more plainly seen and not overlooked, which, if they bother clicking on a
                        > thumbnail, IS advantageous.[/color]

                        If you open your browser, open a website, right click a link and open in
                        a new window, or click a link with a target attribute, or open a window
                        with window.open, Its going to open in the same predictable location
                        every time. Once you start moving that window, you have just caused your
                        users to scratch there heads and ask "What the hell just happened?".
                        And, "Why isn't it where I expect it to be?". That is not just me, its
                        human nature. You get used to things being where they are and when they
                        aren't there, it confuses. And the moving of windows is precisely why I
                        have it disabled.

                        [color=blue]
                        >[color=green][color=darkred]
                        >>>>My desktop is 2560 pixels wide, so the popup window would sit
                        >>>>(or attempt to sit) in between the two monitors.
                        >>>
                        >>>And the percentage of people in your situation is? Right, less than 0.5%
                        >>>I'd guess. This might be a problem if you weren't able to move it yourself...
                        >>>>but even if it was in the center, you could.[/color]
                        >>
                        >>It can't be opened in the center but thats irrelevant. Let it open where
                        >>the user is accustomed to it opening and it totally removes your "problem".[/color]
                        >
                        > Not really. My "problem" was aesthetic (which as we all know is subjective
                        > so please don't try and argue which way is better aesthetically) combined
                        > with functionality. My last paragraph states what I was looking for.[/color]


                        <quote>
                        I'd like to append/amend the following code from the Dreamweaver
                        extension "Open Picture Window Fever" for the ability to center the
                        PopUp window:
                        </quote>

                        That is the first line of your original post. From that statement, you
                        want to center a popup. Stop trying to center the popup and that
                        "problem" goes away.

                        This is your last paragraph before your code:
                        <quote>
                        I'm thinking it would include something like (screen.width-imageWidth)/2;
                        somewhere but not sure how do go about doing this.
                        </quote>

                        What exactly happens when you try that? Or did you even try?

                        And no, I am not going to try to wade through some DW crap code to
                        figure out what its trying to do (DW code nor any add-on code).

                        To get the top of the window, use screen.height.

                        When you get it all worked out, its easier and more reliably to attempt
                        to let the popup resize itself and move itself. It can know its
                        dimensions a lot easier.

                        --
                        Randy
                        comp.lang.javas cript FAQ - http://jibbering.com/faq

                        Comment

                        • Michael Winter

                          #13
                          Re: Centering a PopUp Window Help

                          On Tue, 02 Nov 2004 16:33:18 GMT, Applebrownbetty
                          <applebrown@del etethisspace_ga mebanshee.com> wrote:

                          [snip]
                          [color=blue]
                          > And what source do you have for "most people do not like new windows"?[/color]

                          The number of search results returned on the subject seems to suggest a
                          trend, but also one of the best-known people in the field of
                          human-computer interaction, Jakob Nielsen.
                          [color=blue]
                          > Most people I'd wager are still used to thumbnails opening up, no?[/color]

                          Really? I see quite a mixture.

                          [snip]
                          [color=blue][color=green]
                          >> If the user wants to view the image, you are forcing them to see it in
                          >> a new window.[/color]
                          >
                          > And if you put them inline with CSS, your "forcing" them to download the
                          > larger picture right? [...][/color]

                          Huh? Where did that come from? No, you link to the image. The user can
                          then choose to open the image in a new window, or replace the current
                          content and later use the Back button.
                          [color=blue]
                          > Either way, you're "forcing" the viewer to view the page how you want
                          > them to, the moment you start writing HTML.[/color]

                          What kind of nonsense statement is that? Of course you have to suggest
                          some form of layout for the document, but as long your decisions are
                          remotely sensible, a layout isn't even comparible to forcing an obtrusive
                          new window on the user.

                          [snip]
                          [color=blue][color=green]
                          >> Every graphical browser I have ever used[1] allows the user to open any
                          >> link in a new window.[/color]
                          >
                          > Again, we are talking about thumbnails. See above.[/color]

                          How does my comment not apply?

                          You seem to be more interested in what *you* want. If that's the case,
                          please don't waste the time of either one of us by replying.

                          Mike

                          --
                          Michael Winter
                          Replace ".invalid" with ".uk" to reply by e-mail.

                          Comment

                          • Andrew Thompson

                            #14
                            Re: Centering a PopUp Window Help

                            On Tue, 02 Nov 2004 16:33:18 GMT, Applebrownbetty wrote:
                            [color=blue]
                            > ...That is the
                            > essense of this thread, so if you're talking generalities, it's off topic.[/color]

                            Generalities regarding web-useability are *always* on topic
                            when the technology at hand can impact on same.

                            --
                            Andrew Thompson
                            http://www.PhySci.org/codes/ Web & IT Help
                            http://www.PhySci.org/ Open-source software suite
                            http://www.1point1C.org/ Science & Technology
                            http://www.LensEscapes.com/ Images that escape the mundane

                            Comment

                            • Applebrownbetty

                              #15
                              Re: Centering a PopUp Window Help


                              "Michael Winter" <M.Winter@bluey onder.co.invali d> wrote in message
                              news:opsguq5acg x13kvk@atlantis ...
                              [color=blue][color=green]
                              > > Most people I'd wager are still used to thumbnails opening up, no?[/color]
                              >
                              > Really? I see quite a mixture.[/color]

                              That would support my statement.
                              [color=blue][color=green]
                              > > And if you put them inline with CSS, your "forcing" them to download the
                              > > larger picture right? [...][/color]
                              >
                              > Huh? Where did that come from? No, you link to the image. The user can
                              > then choose to open the image in a new window, or replace the current
                              > content and later use the Back button.[/color]

                              Opening an image where it takes up only a small portion of a large screen
                              with a plain background is, in my opinion, an ugly way to do it.
                              [color=blue]
                              >[color=green]
                              > > Either way, you're "forcing" the viewer to view the page how you want
                              > > them to, the moment you start writing HTML.[/color]
                              >
                              > What kind of nonsense statement is that? Of course you have to suggest
                              > some form of layout for the document, but as long your decisions are
                              > remotely sensible, a layout isn't even comparible to forcing an obtrusive
                              > new window on the user.[/color]

                              On this we'll have to agree to disagree. I don't believe they're as
                              obtrusive as you, especially when it's supported by a common enough action.
                              [color=blue]
                              > You seem to be more interested in what *you* want.[/color]

                              You seem intent on getting people to adhere to your philosophy, and
                              admonishing those who disagree.


                              Comment

                              Working...