Results 1 to 3 of 3

Thread: direct output to new Window/(iframe)

  1. #1
    Join Date
    Dec 2005
    Location
    Provence, France
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default direct output to new Window/(iframe)

    Environment: W2kServer, IExplorer6, VS.NET 2003
    Application: two-frame window: name="content" src="c.aspx" and name="main" src="m.aspx"

    In 'c.aspx' I issue:window.location.href = "ftp://..../SOS.doc" (or .xls, .pdf etc)

    The 'ftp' in turn correctly gives me the 'File Download' prompt to either 'open' or 'save' the downloaded file.
    All is ok when I opt to 'save'. When I opt to 'open' the file shows up in the 'content'-iframe --> However, I'd rather have it in the 'main'-iframe or even better a NEW window alltogether.

    A) 'main'-iframe:
    how can I, after I issued the 'ftp://...' command, direct the focus to the 'main'-iframe in order to receive the output there?
    B) NEW window
    how can I force to open a brand new window to receive the file?

    Or is there any other trick to achieve either one?

    ... I'm pretty sure in the end is an easy thing ...?

    Many thanks for your time and hints
    ed

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I'm not sure how this will work in conjunction with aspx and ftp addresses but, it should be fine. It is how these things would normally be done so, worth a shot. To open in main:

    Code:
    window.parent['main'].location.href='ftp://..../SOS.doc'
    To open in a new window:

    Code:
    window.open('ftp://..../SOS.doc')
    The thing I am least clear on is if these commands will bring up the save/open prompt or not. Give them a try and see what happens.

    Note: The brackets, quotes and parenthesis used in the code are literal, do not remove them when trying this out.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Dec 2005
    Location
    Provence, France
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi John,
    Thank you. All is ok now. I use now:

    window.open(FTPpath) ' "main" being the frame name!

    This way I get now a new IE window AND the 'File Download' prompt!

    When using below statement I'm fine too, however, there is a different behavour dependent on how the 'Folder Options' are set! (see Folder options- filet ypes- e.g..doc - advanced - !combination of 1st and last tick marks!.

    window.parent.main.location.href=FTPpath ' "main" being the frame name!

    Thanks again and have good 2006
    ed

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •