Your exact requirements have never been clear, becase you change them, or add things, every time you post.
You first asked how to open a PDF without clicking. You were shown this.
Then you came back with more requirements, saying the PDF was actually on a different site, which you wanted to open, and then open the PDF. You did not specify you wanted the PDF opened as well as the new site, so I assumed you simply wanted to replace it, and thus gave you the short code to simply open a PDF on a remote site (albeit with clicking).
Then you added another requirement - informing the user that they will be opening a PDF. I told you how to do this (with a window.confirm, giving the user the chance to opt out).
Then you said you DIDN'T want to inform the user, which contradicted your previous statement, simply saying you want to open a document without clicking (which gbaughma showed you how to do in his first post right at the top of this thread).
Now you say you wat to see if a user is logged in or not - which is yet another requirement.
So - to open a PDF (or ANY file) without clicking, use the code that was posted right at the top of this thread. You can put in in an onload event like so:
Code:
<body onload="window.open('somePDF.pdf', '', '');">
If that is not what you want, then please, for the sake of brevity, can you just list all of your requirements in once place, without adding more every time someone posts.
Dan
Coedit Limited - Delivering standards compliant, accessible web solutions
[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]