Opening and Filling New Windows

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

    Opening and Filling New Windows


    The code below successfully open a blank new Window, the OpenWin function is
    held in a separate file and I use it successfully to open windows elsewhere
    on my site. However the window is completely blank and "about:blan k -
    Microsoft Internet explorer" appears in it's title bar. The new window
    corresponds to the sizes I enter in the OpenWin function, so this must be
    working.

    What I want is for a PDF file, based on the user's selection to be displayed
    in this new window. Can anyone see from the code below why this is not
    happening?

    <table>
    <tr>
    <form name=Downloads method=POST action=Choice.a sp target=TestWin>
    <td>
    <Select size="3" Name=Download onchange=OpenWi n("TestWin",720 ,600)>
    <option value="1">Downl oad1
    <option value="2">Downl oad2
    <option value="3">Downl oad3
    <option value="4">Downl oad4
    </Select>
    </td>
    </form>
    </tr>
    </table>



    This is the body of Choice.asp, which is in the same directory as the
    calling page above:

    <body>
    <%
    Select Case Request("Downlo ad")
    Case 1
    Response.Redire ct ("Download1.pdf ")
    Case 2
    Response.Redire ct ("Download2.pdf ")
    Case 3
    Response.Redire ct ("Download3.pdf ")
    Case 4
    Response.Redire ct ("Download4.pdf ")
    End select
    %>
    </body>

    All the PDF are in the same directory.

    When I manually enter a URL ....{path}/Choice.asp?Down load=1, then
    Download1.pdf appears in the window.

    Can anyone assist... this has been driving me crazy!!!!!


  • Mike Brind

    #2
    Re: Opening and Filling New Windows


    EA wrote:[color=blue]
    > The code below successfully open a blank new Window, the OpenWin function is
    > held in a separate file and I use it successfully to open windows elsewhere
    > on my site. However the window is completely blank and "about:blan k -
    > Microsoft Internet explorer" appears in it's title bar. The new window
    > corresponds to the sizes I enter in the OpenWin function, so this must be
    > working.
    >
    > What I want is for a PDF file, based on the user's selection to be displayed
    > in this new window. Can anyone see from the code below why this is not
    > happening?
    >
    > <table>
    > <tr>
    > <form name=Downloads method=POST action=Choice.a sp target=TestWin>
    > <td>
    > <Select size="3" Name=Download onchange=OpenWi n("TestWin",720 ,600)>
    > <option value="1">Downl oad1
    > <option value="2">Downl oad2
    > <option value="3">Downl oad3
    > <option value="4">Downl oad4
    > </Select>
    > </td>
    > </form>
    > </tr>
    > </table>
    >
    >
    >
    > This is the body of Choice.asp, which is in the same directory as the
    > calling page above:
    >
    > <body>
    > <%
    > Select Case Request("Downlo ad")
    > Case 1
    > Response.Redire ct ("Download1.pdf ")
    > Case 2
    > Response.Redire ct ("Download2.pdf ")
    > Case 3
    > Response.Redire ct ("Download3.pdf ")
    > Case 4
    > Response.Redire ct ("Download4.pdf ")
    > End select
    > %>
    > </body>
    >
    > All the PDF are in the same directory.
    >
    > When I manually enter a URL ....{path}/Choice.asp?Down load=1, then
    > Download1.pdf appears in the window.
    >
    > Can anyone assist... this has been driving me crazy!!!!![/color]

    This is a client-side question, which would best be addressed in a
    group dealing with client-side scripting. Try
    microsoft.publi c.scripting.jsc ript.

    --
    Mike Brind

    Comment

    • Lee Carnell

      #3
      Re: Opening and Filling New Windows

      EA wrote:[color=blue]
      > The code below successfully open a blank new Window, the OpenWin
      > function is held in a separate file and I use it successfully to open
      > windows elsewhere on my site. However the window is completely blank
      > and "about:blan k - Microsoft Internet explorer" appears in it's title
      > bar. The new window corresponds to the sizes I enter in the OpenWin
      > function, so this must be working.
      >
      > What I want is for a PDF file, based on the user's selection to be
      > displayed in this new window. Can anyone see from the code below why
      > this is not happening?
      >
      > <table>
      > <tr>
      > <form name=Downloads method=POST action=Choice.a sp
      > target=TestWin> <td>
      > <Select size="3" Name=Download
      > onchange=OpenWi n("TestWin",720 ,600)> <option
      > value="1">Downl oad1 <option value="2">Downl oad2
      > <option value="3">Downl oad3
      > <option value="4">Downl oad4
      > </Select>
      > </td>
      > </form>
      > </tr>
      > </table>
      >
      >
      >
      > This is the body of Choice.asp, which is in the same directory as the
      > calling page above:
      >
      > <body>
      > <%
      > Select Case Request("Downlo ad")
      > Case 1
      > Response.Redire ct ("Download1.pdf ")
      > Case 2
      > Response.Redire ct ("Download2.pdf ")
      > Case 3
      > Response.Redire ct ("Download3.pdf ")
      > Case 4
      > Response.Redire ct ("Download4.pdf ")
      > End select
      > %>
      > </body>
      >
      > All the PDF are in the same directory.
      >
      > When I manually enter a URL ....{path}/Choice.asp?Down load=1, then
      > Download1.pdf appears in the window.
      >
      > Can anyone assist... this has been driving me crazy!!!!![/color]

      What happens if you close the option tags?

      Have you tried to response.write the contents of the form in Choice.asp?


      --
      Lee Carnell
      "Oh my God... they float... they float through space... they will carry
      me across the void... I feel them coming!" -- overheard in Ward 13 and
      registered by the resident psychiatrist.


      Comment

      • Walter Zackery

        #4
        Re: Opening and Filling New Windows

        Why is the FORM tag inside of the TR tag instead of the TD tag?
        Does the OpenWin function submit the form? Nothing in the code below does
        that.

        "EA" <NOSPAM@twelve. me.uk> wrote in message
        news:448dd63a$0 $958$ed2619ec@p tn-nntp-reader01.plus.n et...[color=blue]
        >
        > The code below successfully open a blank new Window, the OpenWin function
        > is held in a separate file and I use it successfully to open windows
        > elsewhere on my site. However the window is completely blank and
        > "about:blan k - Microsoft Internet explorer" appears in it's title bar.
        > The new window corresponds to the sizes I enter in the OpenWin function,
        > so this must be working.
        >
        > What I want is for a PDF file, based on the user's selection to be
        > displayed in this new window. Can anyone see from the code below why this
        > is not happening?
        >
        > <table>
        > <tr>
        > <form name=Downloads method=POST action=Choice.a sp target=TestWin>
        > <td>
        > <Select size="3" Name=Download onchange=OpenWi n("TestWin",720 ,600)>
        > <option value="1">Downl oad1
        > <option value="2">Downl oad2
        > <option value="3">Downl oad3
        > <option value="4">Downl oad4
        > </Select>
        > </td>
        > </form>
        > </tr>
        > </table>
        >
        >
        >
        > This is the body of Choice.asp, which is in the same directory as the
        > calling page above:
        >
        > <body>
        > <%
        > Select Case Request("Downlo ad")
        > Case 1
        > Response.Redire ct ("Download1.pdf ")
        > Case 2
        > Response.Redire ct ("Download2.pdf ")
        > Case 3
        > Response.Redire ct ("Download3.pdf ")
        > Case 4
        > Response.Redire ct ("Download4.pdf ")
        > End select
        > %>
        > </body>
        >
        > All the PDF are in the same directory.
        >
        > When I manually enter a URL ....{path}/Choice.asp?Down load=1, then
        > Download1.pdf appears in the window.
        >
        > Can anyone assist... this has been driving me crazy!!!!!
        >[/color]


        Comment

        • Mike Brind

          #5
          Re: Opening and Filling New Windows


          Mike Brind wrote:[color=blue]
          > EA wrote:[color=green]
          > > The code below successfully open a blank new Window, the OpenWin function is
          > > held in a separate file and I use it successfully to open windows elsewhere
          > > on my site. However the window is completely blank and "about:blan k -
          > > Microsoft Internet explorer" appears in it's title bar. The new window
          > > corresponds to the sizes I enter in the OpenWin function, so this must be
          > > working.
          > >
          > > What I want is for a PDF file, based on the user's selection to be displayed
          > > in this new window. Can anyone see from the code below why this is not
          > > happening?
          > >
          > > <table>
          > > <tr>
          > > <form name=Downloads method=POST action=Choice.a sp target=TestWin>
          > > <td>
          > > <Select size="3" Name=Download onchange=OpenWi n("TestWin",720 ,600)>
          > > <option value="1">Downl oad1
          > > <option value="2">Downl oad2
          > > <option value="3">Downl oad3
          > > <option value="4">Downl oad4
          > > </Select>
          > > </td>
          > > </form>
          > > </tr>
          > > </table>
          > >
          > >
          > >
          > > This is the body of Choice.asp, which is in the same directory as the
          > > calling page above:
          > >
          > > <body>
          > > <%
          > > Select Case Request("Downlo ad")
          > > Case 1
          > > Response.Redire ct ("Download1.pdf ")
          > > Case 2
          > > Response.Redire ct ("Download2.pdf ")
          > > Case 3
          > > Response.Redire ct ("Download3.pdf ")
          > > Case 4
          > > Response.Redire ct ("Download4.pdf ")
          > > End select
          > > %>
          > > </body>
          > >
          > > All the PDF are in the same directory.
          > >
          > > When I manually enter a URL ....{path}/Choice.asp?Down load=1, then
          > > Download1.pdf appears in the window.
          > >
          > > Can anyone assist... this has been driving me crazy!!!!![/color]
          >
          > This is a client-side question, which would best be addressed in a
          > group dealing with client-side scripting. Try
          > microsoft.publi c.scripting.jsc ript.
          >[/color]

          Oh hold on... try this:

          Select Case cint(Request("D ownload"))

          --
          Mike Brind

          Comment

          Working...