var iframe = document.getElementById('invoiceIFrame'); iframe.src = 'https://app.invoiceninja.com/view/' + window.location.search.substring(1, 33);