Open PDF in browser - but cant control/close window from javascript

Hi
I hope I picked the correct forum
Basically I have a site in asp classic. From a button I opens 2
windows via javascript.
One contains info, one shows a related file ( could be tiff or pdf ).
When user closes info-window, I also close the file window via javascript, so that user only hav to click once.
That works with tiff, but not with pdf, '!file.closed' returns that window are already closed.
Somehow I simply loose contact to that window when I open pdf.
My Adobe is set  with "open pdf in browser", version 10.1.2
Any Ideas ?
Overview what I do:
function openTwoWindows(jnr,vikar,hvorfra){
          var left, top,vikar;
          width = (window.screen.availWidth/2)+80;
          width2 = (window.screen.availWidth/2)-80;
          height  = (window.screen.availHeight);
          info = window.open('info.asp'','top=0,left=0,height='+height+',width='+width+',resizable=yes,scr ollbars=yes,status=yes');
          var settings= 'toolbar=no,location=no,directories=no,'+
          'status=no,menubar=no,scrollbars=no,resizable=yes, top=0, left='+width+', height='+height+',width='+width2;
          file = window.open('showfile.asp?strJnr='+jnr+'&print=false','file',settings);
          info.focus();
function closeFileWindow(){
            if(file && !file.closed){
                         file.close();
if the file is a pdf -> showfile code in asp classic:
Response.AddHeader "Content-Disposition","inline;filename=filename.pdf"
Response.ContentType = "Application/pdf"
'Response.Clear
Response.Buffer = true
// fetch file from database
Response.BinaryWrite rsTmp("Fil")
Response.Flush
Response.End

Read this:
http://forums.adobe.com/thread/535609?tstart=0

Similar Messages

  • Open PDF in browser causes blank error box (Windows 7)

    I just freshly installed Windows 7 today. I then installed Adobe Design Premium CS4, including Adobe Acrobat Pro. I use IE8 and Firefox 3.6.
    FYI, this problem does not occur in Windows Vista or lower...only Windows 7.
    The problem is that when I click on links to PDF documents that open in a browser window, a blank error message box will sometimes popup and nothing else happens (see blank error box below). But other times when I click on the same PDF, it will open just fine. I tried opening it four times in a row, and it worked 3/4 times. Then, I did it four times again, and it only worked 1/4 that time. Totally random.
    So I tried clearing the browser cache - no luck.
    Tried reinstalling Adobe Reader 9.3 - no luck.
    Tried uninstalling Adobe.com and Adobe AIR - no luck.
    Tried both IE8 and Firefox - both randomly showed the blank error box.
    The PDF documents are being rendered through PHP, so I also tried changing the PHP header(), but the same blank error box kept randomly showing up.
    What in the world is going on here?

    Guys,
    There is a simple workaround for this. Just DON'T "Display PDF in a Browser". At first I was going to have all the users in my company Right-Mouse Click and Save PDF to their Desktop. But then realized it's just simpler to have the PDF open in the Reader and it gets around the problem fine. This is a great workaround until the whole Windows 7/IE8/Adobe PDF situation mature a bit.
    In case you forgot the instructions from John, here's how:
    Open Adobe Reader or Adobe Acrobat (Pro):
    -> select the menu "Edit"
    -> select "Preferences"
    -> select the Category "Internet"
    -> UNCHECK the "Display PDF in browser"
    This worked for our company. Hope it works for you.
    - Greg H.

  • Error Box when Opening PDF in Browser

    Ever since I installed CS4 Web Premium on my new Windows 7 32 bit install when I try to open a PDF in the browser it opens a Blank Error Box (like a javascript alert box, but with nothing it).  When I close the box I just get a white page.  If I hit refresh the PDF opens fine.  If I try and hit the URL directly again, the problem is back.  The same happens in all my browsers:  IE8, Latest FF and Chrome.  I can download and open PDFs just fine, but trying to open them in a browser window always does the same no matter what site I am on.
    Perhaps related, but possibly not ... I also have similar behavior from Flash.  Some sites with Flash elements on the screen give me what appear to be debug messages.  I have seen this happen in all browsers, but it doesn't happen with all flash, just some.
    I checked my add/remove programs and all I have installed is:
    Adobe Air
    Adobe Creative Suite 4 Web Premium
    Adobe Flash Player 10 AciveX
    Adobe Flash Player 10 Plugin
    Adobe Media Player
    Any idea what might be going on with this?  It is getting really annoying.

    Sideo21, you said "...C:Program Files (x86)\Adobe\Reader10.0\Reader\AcroRd32.exe", but there is no option to change it."
    I had tried the other steps but didn't work for me. However, here's what worked for me.
    Like you, I also have Adobe X V10.1.2 (on Windows 7 64-bit), and the path is showing 10.0 and there is no option to change it. (I think this should be edit-able). My path in Adobe preferences was missing the \Reader directory, so I copied the AcroRd32.exe from the actual Reader\ directory and pasted it into the \Reader10.0 directory so that the path matches. Now, when I open a PDF doc from Chrome V16, the PDF document opens up fine and there are no error messages.
    Thanks for the hint Sideo21.

  • Disable 'open PDF in browser'

    Hi,
    I'm trying to disable the open PDF in browser option in a corporate enviroment. The Adobe knowledge base said that this can be done by disabling the addon called 'Adobe PDF Reader'
    I've set a policy to disable this addon, but the PDF still open in the browser.  Any ideas?
    Also is there a registry key to disable instead? We are using IE11 as a browser.
    Thanks
    Dave

    Hello,
    Please try the below reg.
    [HKEY_CURRENT_USER\Software\Adobe\Acrobat Reader\11.0\Originals]
    “bBrowserIntegration”=dword:00000000
    ~Deepak

  • Can't open PDFs in browser

    Hello!
    My Mac can't open PDFs in the browser window anymore, but just offers a download dialogue.
    I already read in the forum, that it may help, to open the Acrobat Reader prefs and uncheck the "open PDF in browser window" option. The problem is though, that this option is greyed out, so I can' t uncheck it.
    And: As for me I don't need to open the PDFs using the Adobe plug in.
    I just want to see the PDFs quick and simple.
    Any ideas gladly appreciated!
    Thomas

    Remove the plugin from HD>Library>Internet Plugins.

  • Cannot open PDFs in browser in IE from Search Center

    [SYSTEM]
    SharePoint 2013 Enterprise, 2WFE, 2App, 1SQL
    [ISSUE]
    We have a problem with opening PDF files from search results in IE. I can open PDFs in the browser with Chrome and Firefox in all site collections as well as search results.  If using IE10, I can open PDFs in browser everywhere except
    the Search results page. Also, if I right click on a document in search results, and click "Open in new tab" or "Open in new window", then the pdf opens up in browser just fine. If I copy the URL and paste it into the address
    box, the document will also open in browser with no problem.
    The only way that the browser tries to open a pdf document in the client is when you click on the document directly in Search results. All other ways of opening the file yield the right result.
    We really need PDFs to open in browser in IE.  Please help. 
    [TROUBLESHOOTING DONE]
    I set the Web Application Browser File Handling to Permissive from Central Administration.
    I specified for files to open in the browser in Search Center preferences accessible from the bottom of the search results page.
    I verified that "application/pdf" is an AllowedInlineDownloadedMimeType
    The Office Web Apps settings were modified to open PDFs in the default PDF reader rather than OWA.

    Hi Jerry,
    Can you check the similar thread
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/d554e88c-d72f-46b0-8b1a-2f2024fcb9c0/i-e-8-browser-wont-open-pdf-file-returned-from-sharepoint-2010-search?forum=sharepointadminprevious
    My Blog- http://www.sharepoint-journey.com|
    If a post answers your question, please click Mark As Answer on that post and Vote as Helpful

  • ?? I cannot open PDF files ?? Adobe Reader 8, Windows Vista, Firefox Browser ?? help ??

    ?? I cannot open PDF files ?? Adobe Reader 8, Windows Vista, Firefox Browser ?? help ??

    Why the question marks? Can you open PDF files or not? You don't need Firefox to open PDF files.

  • When i open my firefox browser i get alot of windows opening at the same time

    when i open my firefox browser i get alot of windows opening at the same time , this just started a couple of days ago , it is really annoying how do i fix this problem? this is the website that attacks my browser ... http://hosting.adjug.com/AdJugSearch/Results.aspx?ivi=V5PU&aid=1591&slid=116515&CacheBuster=81841886
    == This happened ==
    Every time Firefox opened
    == july 1st 2010

    The site adjug.com is a hosting site for advertising. See: http://www.robtex.com/r/x?q=adjug.com
    Check your home page settings to see if they are correct: http://support.mozilla.com/en-US/kb/How+to+set+the+home+page
    You may have been infected by some malware.
    <u>'''Check for Malware'''</u>
    Install, update and run these programs <u>in this order</u>. They are all free for personal use, but some have limited functionality in the "free mode", but those are features you really don't need to find and remove the problem that you have. (<u>'''Not all programs detect the same Malware.'''</u>)
    Malwarebytes' Anti-Malware - http://www.malwarebytes.org/mbam.php
    SuperAntispyware - http://www.superantispyware.com/
    AdAware - http://www.lavasoftusa.com/software/adaware/
    Spybot Search & Destroy - http://www.safer-networking.org/en/index.html
    Windows Defender - http://www.microsoft.com/windows/products/winfamily/defender/default.mspx
    Dr. Web Cureit - http://www.freedrweb.com/cureit/
    If these don't find it or can't clear it, post in one of these forums for specialized malware removal help:
    http://bleepingcomputer.com
    http://www.spywareinfoforum.com/
    http://www.spywarewarrior.com/index.php
    http://forum.aumha.org/
    <u>'''''Other Issues'''''</u>: ~~red:You have installed plug-ins with known security issues. You should update them immediately.~~
    <u>'''You'''</u> ~~red:<u>'''MAY'''</u>~~ <u>'''need to Update Adobe Reader for Firefox (aka Adobe PDF Plug-In For Firefox)'''</u>: your ver. N/A; current ver. 9.3.3 (important security update release 06-29-2010; see: http://www.adobe.com/support/security/bulletins/apsb10-15.html)
    ~~red:Check your version here~~: http://www.mozilla.com/en-US/plugincheck/
    See: http://support.mozilla.com/en-US/kb/Using+the+Adobe+Reader+plugin+with+Firefox#Installing_and_updating_Adobe_Reader
    ''<u>You may be able to update from the Adobe Reader installed on your system</u>'' instead of going to the Adobe site and downloading. Start > Program Files, find and click Adobe Reader to open, click Help, click Check for Updates.
    ''<u>If you go to the Adobe site to download the current Adobe Reader:</u>''
    -'''<u>use Firefox to download</u>''' and <u>'''SAVE to your hard drive'''</u> (save to Desktop for easy access)
    ~~red:-See the images at the bottom left of this post to see the steps to take on the Adobe site~~
    -exit Firefox (File > Exit)
    -check to see that Firefox is completely closed (''Ctrl+Alt+Del, choose Task Manager, click Processes tab, if "firefox.exe" is on the list, right-click "firefox.exe" and choose End process, close the Task Manager window'')
    -double-click on the Adobe Reader installer you just downloaded to install/update Adobe Reader
    *<u>'''NOTE: On Vista and Windows 7'''</u> you may need to run the plugin installer as Administrator by starting the installer via the right-click context menu if you do not get an UAC prompt to ask for permission to continue (i.e nothing seems to happen). See this: http://vistasupport.mvps.org/run_as_administrator.htm
    *'''<u>NOTE for IE:</u>''' Firefox and most other browsers use a Plugin. IE uses an ActiveX version. To install/update the IE ActiveX version, same instructions as above, except use IE to download the ActiveX installer.
    *Also see: http://kb.mozillazine.org/Adobe_Reader ~~red:'''''AND'''''~~ [[How do I edit options to add Adobe to the list of allowed sites]]

  • 11-06-11 Cannot open pdf file on web in firefox after update from Acrobat today

    Adobe Acrobat had an update that I installed today. Later, when attempting to open a pdf form from a website, firefox does not open the file. I verified the settings in Firefox options and it is selected to open pdf in Firefox but it doesn't work. I am on a Windows XP system with 32bit.

    Apparently I was incorrect on the Cisco box, we are using something different now. We use an Extended application server attached to a Meta Call feature server. This is a known issue for them.
    "We have discovered an issue that means that the format of fax PDFs generated on most versions of Metaswitch EAS is incompatible with the latest Adobe Reader (11.0.01).  This means that when your end users upgrade their Adobe Reader to 11.0.01, they will no longer be able to view faxes received from EAS in PDF format."
    The same is with version 10.1.5. I uninstalled 10.1.5 and reinstalled 10.1.4 and the problem went away. No updates for us for now

  • Mozilla can't find a valid PDF file to open in a browser, but Chrome or IE work without problem. Why?

    The system I'm running is Scientific Linux.
    PDF files, I need to open in a browser, are on the file server, but in the same folder as my html files, etc.
    So, in HTML I gave the link to some PDF to open it in the browser, however, Mozilla says it can't find the file by the given URL.
    Proper permissions to access the files are given.
    All is lowercase, no spelling error.
    On Chrome, on the same computer, everything works fine.
    I've also tested on Windows, still Chrome or IE work without problem.
    Any ideas?

    Thanks for your reply!
    I've checked the link, and everything is set to its normal form in my browser.
    Otherwise this particular case, the browser has no problems viewing PDF files,
    but here, when I try to open the PDF (using HTML code, say,
    href="downloads\file1.pdf" where "downloads" is a folder on the same level as the html file) then the error I am getting is this
    Not Found
    The requested URL (the name) was not found on this server.

  • I enable Display PDF in browser but still opens in Reader

    Our current client PC's are Windows XP 32-bit, IE 7, using Adobe X v.10.1.2. We have an application that opens PDF files. We have the parameter "Display PDF in browser" enabled and it opens in the browser as it should.
    However, new PC's are built with Windows 7 63-bit, IE 8, using Adobe X v.10.1.2. Using the same application with the parameter "Display PDF in browser" enabled, it always asks if you want to open in Reader or save the file. That shouldn't happen. It does this whether the paramter is enabled or disabled, it also does this using 32bit IE 8 or 64bit.
    Is this a Adobe bug, Win 7 bug, or how can we make it open in the browser? Using another browser is not an option. IE is the company standard.
    Thanks

    Does it work correctly on "normal" web pages, e.g. the PDF links near the bottom of http://forums.adobe.com/community/adobe_reader_forums ?
    In a 32-bit browser, the PDFs should open inside the browser.
    With a 64-bit browser, the PDFs will open in an external Adobe Reader window.

  • FF 5 no longer opens pdf in browser window & only fix on offer, Dafizilla ViewSourceWith, won't instal and greys out Menu bar.

    ''locking this thread - discussion is here - https://support.mozilla.com/en-US/questions/857882''
    I thought I had the Foxit Reader Plug-In reinstalled since I installed FF5, but I've reinstalled it again anyway and reset it to open in Firefox under Tools Options. Once I was happy with the latest Foxit Reader I really didn't want to even try the dead-buried-and-decomposed Adobe Acrobat again. I've disabled that now as it wasn't opening pdfs in Firefox either when I had it selected under Tools Options.

    These are the steps I performed on my own system many months ago. I could not view PDF files in Firefox with both Adobe Reader and Foxit installed.
    #Close Firefox (File > Exit '''''OR''''' Firefox button > Exit)
    #If you have not already done so, uninstall Adobe Reader 9.4.5 using Windows Start > Settings > Control Panel > Add or Remove Programs, click on the item, click Remove. You may need to restart your system.
    #Open Foxit in your programs list Windows Start > Programs
    #*on the Foxit menu, click Tools > Preferences
    #*click File Associations and be sure "Display PDF in browser" is checked then click "Make Default PDF Viewer" then click OK
    #*close Foxit Reader (File > Exit)
    #Start Firefox
    #*Open the Applications panel (Tools > Options > Applications '''''OR''''' Firefox button > Options > Options > Applications)
    #*type '''pdf''' in the search box; you should see "Foxit Reader PDF document"
    #*in Action column, click the down arrow at the far right end
    #*choose "Use Foxit Reader plugin for Mozilla (in Firefox)'
    #**if the full name does not display, place the cursor over the item to see the full name in a tooltip box
    #Test on a pdf file from the internet
    #*If there is no toolbar at the top of the PDF display in the tab (just a blue strip), tap the F8 key to get the Basic toolbar, or right-click the blue strip at the top to display/not display other toolbars by clicking on them (checked=display; un-checked=do not display)
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''

  • Disabling open pdf in browser in adobe PRO XI not reader

    I have deployed adobe pro out to our user base and i understand in adobe PRO X there was a check box that would disable open pdf in a browser but that has gone away. I have gone under the preferences and on the internet section in PRO XI there is a link that takes you
    here: http://helpx.adobe.com/acrobat/using/display-pdf-browser-acrobat-xi.html I have created a GPO that disables the active X control in both IE 8 and IE 10 as you can see from this screen shot the adobe pdf reader is disabled so according to the instructions on the web all pdf files should open in PRO XI. This is not the case. The pdf will still open in the browser. I have checked the new customizations wizzard for adobe PRO XI and there is nothing to disable disply pdf in the browser to uncheck that i am aware of. I have read about the bdisablewebintegration but this have not worked either under the FeatureLockDown. In adobe reader you can go under the accessibilty options and disable open within a browser there but I have been unable to find that option in PRO XI. Had anyone found a fix for this issue to where it can be deployed out?
    Please let me know
    Thanks
    pjhernan

    From the screenshot it looks like you have both Acrobat and Reader on the machine and only Reader is disabled.
    Check again. If you think the doc is incorrect, post back.
    --- more info ---
    All browser integration prefs were deprecated with 11.x because browser companies are releasing new versions every 6 weeks or more. It was simply not possible to keep pace without requiring admins to update every few weeks. Moreover, most browsers are gradually phasing out such plugins or at least disable them by default (e.g. Chrome). Many companies provide a browser-specific PDF viewer. Acrobat and Reader share the same config and there's nothing different between the two.
    Ben

  • Browser Crashing when opening PDF inside Browser

    I have a Windows XP Pro SP 3 with IE 7 , Acrobat Pro 9.
    My issue is that whenever I open a PDF inside the browser I get a error message stating that the browser crashed / stopped responding and needs to close.  The work around that we have been using was simply inside Adobe going to  edit> preferences> internet> unchecking view PDF in browser.
    We are launching a new application that requires a PDF to be displayed inside a browser.  Any help would be greatly appreaciated.
    This issue also happens with Firefox, and I have removed and reinstalled adobe several times.
    Thanks,
    Adam

    To clarify what you posted:
    When opening the PDF document, your browser closes. When pressing the control key and opening the document, you get a dialog window (with the choices of open or save). What happens when you select open?
    This is browser behavior, nothing to do with this being a PDF file. Which browser and which platform? If you are using IE7, popup blocker is automatically enabled, and if you are viewing this on a 2003 server, you have server security settings to override. Pressing the control key allows popups.

  • Adobe Reader will not open PDF in browser simple answer.

    I just had this problem and was able to work through it with the help of tech support from TD Ameritrade.  The fix is simple so read on.  After uninstalling and reinstalling all things adobe and trying other recommendations on these forums I was stumped.  I called my broker tech section since I couldn't open their reports and we identified what my specific problem was.  For me, and I imagine some of you this will help and prevent a lot of wasted time.
    Nothing was wrong with my Adobe Reader.  My problem was that I have a 64 bit operating system and both of my default browsers were 64 bit browsers.  I did not know my internet explorer default browser was the 64 bit one until the technician that assisted me informed me that a recent windows update made all 64 bit systems default to 64 bit internet explorer browsers.  You cannot change that default by choosing between 64 bit and 32 bit, because you can only choose internet explorer.  That explains why my attempts to open with a 32 bit browsers always failed.  I also tried with Firefox thinking it was 32 bit and it failed as well.  The technician informed me Firefox is a 64 bit browser and then it made sense.  I guess the recent Adobe reader update caused a change that no longer allowed my 64 bit system and 64 bit browser to open PDF's through the browser. The technician who assisted me has a 64 bit system and only uses 64 bit browsers and can still open PDF's through those browsers.  That confused us for a while until we realized he had his Adobe updater turned off and therefore had not been exposed yet to the update that originated my problems.
    ****ANSWER FOR MY PROBLEM*******The quick answer is use Google Chrome or some other 32 bit browser.  If you set a 32 bit browser as your default, the PDF's will open.  You cannot set Internet Explorer 32 bit browser as your default if you have a 64 bit system and also have 64 bit Internet Explorer.  The windows update prevents you from doing it.  At least that is my understanding. 
    The bottom line is I have the newest Adobe Reader on a 64 bit system and can open any web PDF with Google Chrome set as my default browser, because it is a 32 bit browser.  The new Adobe Reader will not open PDF's with a 64 bit browser in Vista.  A 64 bit system is fine as long as you use the 32 bit browser to open your PDF's in Vista.  I hope this helps some avoid some headaches.  I wish it had been posted when my problem first arose. 
    I think you can use a 64 bit browser in Windows 9 or later, but for Vista the above applies.

    Yes I can create a short cut to internet exp. 32 bit on my desktop and I can even be using Internet expl. 32 bit, but when I try to open a PDF with adobe reader it won't work with internet exp. as my default browser b/c windows will always choose Internet exp. 64 bit which isn't supported yet by adobe reader.  With google chrome as my default browser windows can't choose an unsupported 64 bit browser in its place b/c google chrome doesn't have a 64 bit version.
    My post was for those people who may not have realized yet that windows would not ever choose Internet expl. 32 bit over Internet expl. 64 bit if both exist on their system.  For them it is easiest to just choose a default browser that only has a 32 bit version. 
    If I understood your reply correctly, you were telling me how to create a shortcut to Internet exp. 32 bit on my desk top.  However, having that shortcut on my desk top and opening my browser through it will not prevent the problem of windows choosing my Internet exp. 64 bit browser for pdf's I try to open from the web.  Thank you for your response, but I think the problem that I have tried to explain does exist for many users and can only be fixed by using a 32 bit browser that is not Internet explorer as your default browser.  At some point if windows fixes the update that always chooses Internet expl. 64 bit over Internet expl. 32 bit, then this will all be irrelevant.
    Thanks
    Sent from my iPod

Maybe you are looking for

  • Webcam, USB Ports stopped working suddenly

    Hi everyone,  Wondering if anyone can help me, my webcam and all USB ports have suddenly all stopped working. Yesterday my mouse light was flickering but still working and today the same mouse won't light up at all. I tried with a different mouse and

  • Get vs set

    Hi guys, wondering about the title heh? Well, I have been wondering about what would be the best way to access global variable. Let's take for instance the case of a multi editor IDE like Eclipse. an action occurs which is supposed to do some work on

  • Migrate reports to 9i from 6i - HELP!

    How can I migrate reports from 6i to 9i without re-create them ALL through Report Wizards? THANKS!

  • Entry point not found msvcr110.dll error

    I have Photoshop CC and Lightroom CC both of which were working fine until I installed a PIE Primefilm XA scanner with CyberviewX software. The programs will not open since ibstalling CyberviewX. The following error appears: PSCC has a Photoshop.exe-

  • Tranporting variant of a query

    Hi all, Anyone is having a idea how to transport a variant of a query know variants are stored in TVARVC but I don't want to transport the entries or table want to transport variant stored in TVARVC. Regards, Nandini