I am trying to have a kendoDialog connect to a tag with a PDF file. The dialog will open and then the user will click ok and then the PDF file will open.
<a href=""> ShowPopup before opeing PDF </a> Example dojo
1 Answer
Saw your example in the Telerik DOJO, try this...
<!DOCTYPE html> <html> <head> <meta charset="utf-8"/> <title>Kendo UI Snippet</title> <link rel="stylesheet" href=""/> <script src=""></script> <script src=""></script> </head> <body> <a href=""> ShowPopup before opeing PDF </a> <div></div> <script> $(document).ready(function () { var dialog; $("a").on('click', function(e) { if (dialog) { dialog.open(); } else { dialog = $('#dialog').kendoDialog({ width: "450px", title: "Software Update", closable: false, modal: false, content: "<p>A new version of <strong>Kendo UI</strong> is available. Would you like to download and install it now?<p>", actions: [ { text: 'Skip this version' }, { text: 'Remind me later' }, { text: 'Install update', primary: true } ], }).data('kendoDialog'); } e.preventDefault(); // remove this to proceed to pdf file }); }); </script> </body> </html>This shows the dialog when you click on the link. Remove the preventDefault if you want the download to proceed. Handle the dialog clicks in actions.action. See Kendo Dialog API reference for more details. This should get you going.