How to change a file's access path that is called in a function

How to change a file's access path that is called in a function

I have a function that calls a particular file .pdf however need to be able to
change this file access path, it is possible?


  1. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
  2.         <script type="text/javascript">
  3.             $(function () {
  4.                 window.onload = function abrirPdf() {
  5.                     var iframe = $("#LoteSlips");
  6.                     iframe.attr("src", '<%=arquivo%>_ERRO.pdf#zoom=200&page=<%=i%>'); 
  7.                 };
  8.             });
  9.         </script>