Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 10 years ago .I have a modal window, which contains an anchor text. When i click on this link, it must call a pdf housed somewhere else and display it in a pop up . How can I do that ? Kindly help .
asked Nov 9, 2012 at 9:53 The Dark Knight The Dark Knight 5,575 12 12 gold badges 57 57 silver badges 99 99 bronze badges what do you mean by a modal window? Commented Nov 9, 2012 at 9:56A modal window is a browser modal window. It pops up, when a button is clicked ., which will have a link. When that one is clicked, a pdf pop up must come up .
Commented Nov 9, 2012 at 9:58you can use iframe to show your pdf but it will only show if plugin is available for browser.Another option is to use js library
Commented Nov 9, 2012 at 10:01Hi Rajesh, what is the js library that you are talking about ? Are there any examples on how to achieve this kind of functionality ?
Commented Nov 9, 2012 at 10:02Look into jspdf and pdfjs. It'd be nice if you at least share the HTML/CSS for the modal window to help those trying to help you.
Commented Aug 16, 2014 at 14:20You can do this using with jQuery UI dialog, you can download JQuery ui from here Download JQueryUI
Include these scripts first inside tag
HTML code within tag. Use an iframe to load the pdf file inside
answered Nov 9, 2012 at 10:23 5,669 7 7 gold badges 27 27 silver badges 42 42 bronze badges upvoted, looks good. Will try it out, Tx Commented Nov 9, 2012 at 10:27 I have tested and posted it. Hope it helps you. Commented Nov 9, 2012 at 10:35it's working perfectly most of the modern browsers except safari. In safari, when close the the model window it doesn't close the iframe itself. any idea ?
Commented Feb 4, 2015 at 7:23 @Swarne27 - How about opening the pdf in edit mode and then be able to save my edits in javascript. Commented Apr 29, 2016 at 5:35It's useful to note that the behaviour depends of the settings of the browser. By default for example Firefox will download the document and show a blank frame, whereas Chrome will preview the document inside the frame as expected.Those settings can be updated though.