...

View Full Version : Opening pdf in javascript



demetries
06-04-2004, 11:13 AM
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

jbot
06-04-2004, 11:18 AM
"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.

demetries
06-04-2004, 11:37 AM
is there a way I can open the pdf file via the application rather than in a browser?

jbot
06-04-2004, 11:46 AM
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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum