Click here to Skip to main content
15,868,141 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello All,


I have use

<a href="#" -----="">
</a>

Here After clicking on link i am displaying .pdf file but before that i want to display a warning message and in i click on OK button then it will open Pdf file,if i click on cancel button then it won.t display pdf file.

Please suggest me about that,
Posted

<a href="whatever.pdf" onclick="return confirm('This is a warning message about PDFs for some reason.')">


Returning false from an onClick handler suppresses the usual behaviour (following the link).
 
Share this answer
 
Comments
madhuri@mumbai 21-Jan-12 0:52am    
yes you are right,
but i am opening pdf through javascript,
how can i call javascript on href.
madhuri@mumbai 21-Jan-12 1:54am    
hello,
i resolved this problem,
it was so simple.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900