Hi
What i want to do is display a PDF in an iframe, the URL to the PDF location needs to contain a variable of the documents name which relates to the "Position applying for" field.
(The PDF document will have the the same name as the "Position applying for" field.)
A URL populates some of the fields in the form in this case "Position applying for" field.
This shows the URL i have in the iframe and the yellow is where the PDF document name will appear (in this case its inventory controller.pdf)
I've found quite a bit of info on doing this exact process and here is the current code i'm using, as you can tell i'm a novice with JavaScript
Ive updated the iframe slightly to :-
<iframe id="myframe" src="" width="100%" height="1020px"></iframe>
function loadIframe(iframeName, url) { var $iframe = $('#' + iframeName); if ( $iframe.length ) { $iframe.attr('src',url); return false; } return true; } $(document).ready(function () { function loadDoc() { var base_url ='https://domain.co.nz/Resources/SiteInduction/' var base_url2= '.pdf' var url = $('#q188 input').val(); var url = base_url + url + base_url2; loadIframe('myframe', url); });