Open multiple windows for an asp.net page

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

    Open multiple windows for an asp.net page

    I'm trying to create a form where:
    (a) The user is given a list or Reporting Services reports
    in a listbox
    (b) When the user clicks on a button, then these reports
    are opened in SEPARATE windows.
    So, if there's three reports listed then 3 extra browser
    windows will open IN ADDITION to the one that's already
    open.

    I can use the following line:

    Response.Write( "<script>window .open('" & Me.listbox1.Ite ms
    (i).Text & "','_new'); </script>")

    but as I loop through this code, it opens each report in
    the SAME new window.
    So the first say 2 reports don't get a chance to render
    but the last one does because they are all using the same
    new window. And the last report overwrote the previous
    reports urls in this one window.

    Can anyone suggest how I can execute the above line of
    code x times and have it open x separate new windows
    please?

    Thanks

  • Ken Dopierala Jr.

    #2
    Re: Open multiple windows for an asp.net page

    Hi,

    You need to change the title '_new' for each window. Maybe use a counter in
    your loop and append that to the title. This will open the windows
    separately. Good luck! Ken.

    --
    Ken Dopierala Jr.
    For great ASP.Net web hosting try:

    If you sign up under me and need help, email me.

    "Geoff collishaw" <anonymous@disc ussions.microso ft.com> wrote in message
    news:21d801c4b0 03$35672880$a50 1280a@phx.gbl.. .[color=blue]
    > I'm trying to create a form where:
    > (a) The user is given a list or Reporting Services reports
    > in a listbox
    > (b) When the user clicks on a button, then these reports
    > are opened in SEPARATE windows.
    > So, if there's three reports listed then 3 extra browser
    > windows will open IN ADDITION to the one that's already
    > open.
    >
    > I can use the following line:
    >
    > Response.Write( "<script>window .open('" & Me.listbox1.Ite ms
    > (i).Text & "','_new'); </script>")
    >
    > but as I loop through this code, it opens each report in
    > the SAME new window.
    > So the first say 2 reports don't get a chance to render
    > but the last one does because they are all using the same
    > new window. And the last report overwrote the previous
    > reports urls in this one window.
    >
    > Can anyone suggest how I can execute the above line of
    > code x times and have it open x separate new windows
    > please?
    >
    > Thanks
    >[/color]


    Comment

    • Geoff Collishaw

      #3
      Re: Open multiple windows for an asp.net page


      Your suggestion worked perfectly.
      Thank you very much.
      [color=blue]
      >-----Original Message-----
      >Hi,
      >
      >You need to change the title '_new' for each window.[/color]
      Maybe use a counter in[color=blue]
      >your loop and append that to the title. This will open[/color]
      the windows[color=blue]
      >separately. Good luck! Ken.
      >
      >--
      >Ken Dopierala Jr.
      >For great ASP.Net web hosting try:
      >http://www.webhost4life.com/default.asp?refid=Spinlight
      >If you sign up under me and need help, email me.
      >
      >"Geoff collishaw" <anonymous@disc ussions.microso ft.com>[/color]
      wrote in message[color=blue]
      >news:21d801c4b 003$35672880$a5 01280a@phx.gbl. ..[color=green]
      >> I'm trying to create a form where:
      >> (a) The user is given a list or Reporting Services[/color][/color]
      reports[color=blue][color=green]
      >> in a listbox
      >> (b) When the user clicks on a button, then these reports
      >> are opened in SEPARATE windows.
      >> So, if there's three reports listed then 3 extra browser
      >> windows will open IN ADDITION to the one that's already
      >> open.
      >>
      >> I can use the following line:
      >>
      >> Response.Write( "<script>window .open('" &[/color][/color]
      Me.listbox1.Ite ms[color=blue][color=green]
      >> (i).Text & "','_new'); </script>")
      >>
      >> but as I loop through this code, it opens each report in
      >> the SAME new window.
      >> So the first say 2 reports don't get a chance to render
      >> but the last one does because they are all using the[/color][/color]
      same[color=blue][color=green]
      >> new window. And the last report overwrote the previous
      >> reports urls in this one window.
      >>
      >> Can anyone suggest how I can execute the above line of
      >> code x times and have it open x separate new windows
      >> please?
      >>
      >> Thanks
      >>[/color]
      >
      >
      >.
      >[/color]

      Comment

      Working...