Question about window.open() ....

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

    Question about window.open() ....

    I want to open a window containing a JPEG image, and I want
    the window dimensions to match the image dimensions.

    Therefore, the proper command syntax should be:

    window.open ("mypic.jpg" , "", HEIGHT=256, WIDTH=256)

    This command doesn't work on Internet Explorer!!!! Is there any way
    that I can do this on IE???

    Thanks!!

    - RRR




    Posted Via Binaries.Net Premium Usenet Newsgroup Services
    ----------------------------------------------------------
    ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
    ----------------------------------------------------------
    Start your new business venture with a great domain name. A trusted source for domains since 2005.

  • Jarmo

    #2
    Re: Question about window.open() ....

    "Woody" <rman@goodnet.c om> wrote in message news:421bd121$1 _5@127.0.0.1...[color=blue]
    > I want to open a window containing a JPEG image, and I want
    > the window dimensions to match the image dimensions.
    >
    > Therefore, the proper command syntax should be:
    >
    > window.open ("mypic.jpg" , "", HEIGHT=256, WIDTH=256)
    >
    > This command doesn't work on Internet Explorer!!!! Is there any way
    > that I can do this on IE???[/color]

    How about window.open('my pic.jpg', '', 'left=0,top=0,h eight=256,width =256')?


    Comment

    • Randy Webb

      #3
      Re: Question about window.open() ....

      Woody wrote:
      [color=blue]
      > I want to open a window containing a JPEG image, and I want
      > the window dimensions to match the image dimensions.
      >
      > Therefore, the proper command syntax should be:
      >
      > window.open ("mypic.jpg" , "", HEIGHT=256, WIDTH=256)
      >
      > This command doesn't work on Internet Explorer!!!! Is there any way
      > that I can do this on IE???[/color]

      Yes.

      Oh, you wanted to know how? You quote the attributes, with no spaces,
      comma separated.

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

      Comment

      • Woody

        #4
        Re: Question about window.open() ....

        > > This command doesn't work on Internet Explorer!!!! Is there any way[color=blue][color=green]
        > > that I can do this on IE???[/color]
        >
        > Yes.
        >
        > Oh, you wanted to know how? You quote the attributes, with no spaces,
        > comma separated.
        >[/color]


        Ok. I tried the following command :

        window.open("ba ck1.jpg", "", "HEIGHT=256 ", "WIDTH=256" )

        This ALMOST worked!! Apparently, IE is reading and applying
        the height parameter. My window is 256 pixels high. However, the
        WIDTH did NOT get applied. IE seems to be ignoring the last parameter.

        What the heck is going on??? How can I open a JPEG in a window
        that is sized to the image dimensions??

        - RRR




        Posted Via Binaries.Net Premium Usenet Newsgroup Services
        ----------------------------------------------------------
        ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
        ----------------------------------------------------------
        Start your new business venture with a great domain name. A trusted source for domains since 2005.

        Comment

        • Jarmo

          #5
          Re: Question about window.open() ....

          "Woody" <rman@goodnet.c om> wrote in message news:421beb14$1 _2@127.0.0.1...[color=blue]
          > Ok. I tried the following command :
          >
          > window.open("ba ck1.jpg", "", "HEIGHT=256 ", "WIDTH=256" )[/color]

          I can't recommend guessing as a way to write working code ;-) Where is the
          reference that suggests these parameters?


          Comment

          • Kevin Scholl

            #6
            Re: Question about window.open() ....

            Woody wrote:[color=blue][color=green][color=darkred]
            >>>This command doesn't work on Internet Explorer!!!! Is there any way
            >>>that I can do this on IE???[/color]
            >>
            >>Yes.
            >>
            >>Oh, you wanted to know how? You quote the attributes, with no spaces,
            >>comma separated.
            >>[/color]
            >
            >
            >
            > Ok. I tried the following command :
            >
            > window.open("ba ck1.jpg", "", "HEIGHT=256 ", "WIDTH=256" )
            >
            > This ALMOST worked!! Apparently, IE is reading and applying
            > the height parameter. My window is 256 pixels high. However, the
            > WIDTH did NOT get applied. IE seems to be ignoring the last parameter.
            >
            > What the heck is going on??? How can I open a JPEG in a window
            > that is sized to the image dimensions??[/color]

            window.open("ba ck1.jpg","","he ight=256,width= 256")

            Although you should be aware that 1) there are a number of other
            parameters you can and probably should set, and 2) not all browsers are
            going to open the viewable area of the child window to precisely what
            you are specifying. Also bear in mind that those with javascript
            disabled will not be able to open your popup to view the image.


            --

            *** Remove the DELETE from my address to reply ***

            =============== =============== =============== =========
            Kevin Scholl http://www.ksscholl.com/
            kscholl@comcast .DELETE.net
            ------------------------------------------------------
            Information Architecture, Web Design and Development
            ------------------------------------------------------
            We are the music makers, and we are the dreamers of
            the dreams...
            =============== =============== =============== =========

            Comment

            • Hal Rosser

              #7
              Re: Question about window.open() ....


              "Woody" <rman@goodnet.c om> wrote in message news:421bd121$1 _5@127.0.0.1...[color=blue]
              > I want to open a window containing a JPEG image, and I want
              > the window dimensions to match the image dimensions.
              >
              > Therefore, the proper command syntax should be:
              >
              > window.open ("mypic.jpg" , "", HEIGHT=256, WIDTH=256)
              >
              > This command doesn't work on Internet Explorer!!!! Is there any way
              > that I can do this on IE???[/color]


              you put ONE SET of quotes around ALL the attributes.

              reference:



              Comment

              • Grant Wagner

                #8
                Re: Question about window.open() ....

                "Woody" <rman@goodnet.c om> wrote in message
                news:421beb14$1 _2@127.0.0.1...[color=blue][color=green][color=darkred]
                >> > This command doesn't work on Internet Explorer!!!! Is there any
                >> > way
                >> > that I can do this on IE???[/color]
                >>
                >> Yes.
                >>
                >> Oh, you wanted to know how? You quote the attributes, with no spaces,
                >> comma separated.
                >>[/color]
                >
                >
                > Ok. I tried the following command :
                >
                > window.open("ba ck1.jpg", "", "HEIGHT=256 ", "WIDTH=256" )
                >
                > This ALMOST worked!! Apparently, IE is reading and applying
                > the height parameter. My window is 256 pixels high. However, the
                > WIDTH did NOT get applied. IE seems to be ignoring the last
                > parameter.
                >
                > What the heck is going on??? How can I open a JPEG in a window
                > that is sized to the image dimensions??[/color]

                What's "going on" is that you didn't read the documentation:

                <url: http://docs.sun.com/source/816-6408-...ow.htm#1202731 />
                <url:
                Find official documentation, practical know-how, and expert guidance for builders working and troubleshooting in Microsoft products.

                />
                <url:
                http://www.mozilla.org/docs/dom/domr...6.html#1019331 />

                I'll leave you with my favorite quote about programmers:

                "When I read such posts, I immediately see the primary problem in better
                than 90% of cases -- the poster doesn't realize the compiler won't
                tolerate sloppy syntax. There is nothing in their background to prepare
                them for an entity that, confronted with 10,000 lines of code, insists
                on a comma instead of a semicolon in one of those lines, and refuses to
                accept any of it as a result. This is an experience for which years of
                television viewing, however intense and dedicated, is not the proper
                training."

                --
                Grant Wagner <gwagner@agrico reunited.com>
                comp.lang.javas cript FAQ - http://jibbering.com/faq


                Comment

                Working...