Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Feb 2004
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Opening pdf in javascript

    I am opening a pdf created in version 6.0 using the following javascript:

    function checkBrowser() {
    if (document.all) {
    window.open("pdf/foundationapplication.pdf", "Title", "width:300;height:300;");
    return false;
    } else {
    return true;
    }
    }

    This is called from the onload body of the html file.

    Prior to this, I execute ASP code to send an email using CDONTS on the server and use the command in ASP "Response.Redirect "Thankyou.htm"" to direct me to the htm page that opens the pdf file.

    Behind the pdf file ofcourse is the Thankyou.htm that opened the pdf file.

    When I close the window that has opened the pdf file and go to the
    thankyou.htm file to close that as well, I get the following error:


    "The instruction at '0x05d5f45b' referenced memory at "0x0000000" the memory could not be read"

    Can someone please help.

    Thanks

  • #2
    Senior Coder
    Join Date
    Feb 2004
    Location
    Edinburgh
    Posts
    1,352
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by demetries
    "The instruction at '0x05d5f45b' referenced memory at "0x0000000" the memory could not be read"
    that's not a JS error, but a problem with an application. however, it is likely to have been induced by the way you've done things.

    don't see how you could prevent it tho other than by changing what you want to do.

  • #3
    New to the CF scene
    Join Date
    Feb 2004
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    is there a way I can open the pdf file via the application rather than in a browser?

  • #4
    Senior Coder
    Join Date
    Feb 2004
    Location
    Edinburgh
    Posts
    1,352
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by demetries
    is there a way I can open the pdf file via the application rather than in a browser?
    you'd have to use ActiveX which is WinIE only. so ... er ... no, you can't. sorry.


  •  

    Posting Permissions

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