SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict
    Join Date
    Aug 2005
    Posts
    254
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Opening new windows using JS

    Hi I managed to find a way of opening a PDF in a new window using JavaScript.

    I warned the user beforehand and opened the new window at 80% height and width of the original window to show it was a new window.

    However I can't seem to control XLS, DOC, RTF documents. These are the issues:

    1. Firefox: They always seem to open in a new window anyway.
    2. Firefox: Firefox opens a blank window as well when the JavaScript is used.
    3. IE and Firefox: I can't seem to control the height and width

    Any suggestions (please don't say don't open new windows - I am under instructions to do this).



    Thanks
    Steven

  2. #2
    code ninja hamstu's Avatar
    Join Date
    Nov 2002
    Location
    Montréal, Canada
    Posts
    375
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, AFAIK, most browsers don't understand those formats, so they will simply prompt for a file download. Though I have seen IE open certain documents with a sort of embedded Word.


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
  •