Link to home
Start Free TrialLog in
Avatar of expertsarun
expertsarun

asked on

open save cancel dialogbox Java Script

Dear Friends,

I have a pdf file in /wwwroot/main/source  and if a user clicks on the link to this pdf file , is there any way we can force a dialog box with options open save cancel more info as i want to handle the user response in a different way for each option selected by the user.

Thanks a bunch
Avatar of ahosang
ahosang
Flag of United Kingdom of Great Britain and Northern Ireland image

Not really as you say. But maybe:
<a href="myfile.pdf" onclick="alert('Please use right-click for menu');return false">PDF</a>
Avatar of jaysolomon
jaysolomon

or you could create your on dialog with the buttons you need by using DIV tag
or you could just place it in a zip file and link to that
1) If your app uses IE only, then consider using vbalert box
http://www.javascriptkit.com/javatutors/vbalert.shtml
https://www.experts-exchange.com/questions/20307599/Changing-alert-title.html?query=messagebox&searchType=topic

2) you could create a new window (popup) with the buttons (but remove web window formatting),
I have even seen these windows look just like a dialog box, however I think this would
take some time.

3) If you need only two options, then consider using confirm box
 
https://www.experts-exchange.com/questions/20263949/javascript-yes-no-messagebox.html?query=messagebox&searchType=topic

4) Jay's answer would work.

Hope this helps!
astro
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

PAQ with points refunded

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

jAy
EE Cleanup Volunteer
ASKER CERTIFIED SOLUTION
Avatar of GhostMod
GhostMod
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial