location.replace() to PDF URL fails in IE

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Terpinator
    New Member
    • Jul 2006
    • 1

    location.replace() to PDF URL fails in IE

    My goal is to remove the 'jump page' ( b.jsp ) from History , so when I see the pdf file, and then hit Back, I will go back to 'a.jsp'.

    This works in Firefox but not in IE ... Anyone have any idea ??

    Code:
    <!-- a.jsp ->
    ..
    ..
    <a href="b.jsp">File B</a>
    ..
    ..
    
    <!-- b.jsp ->
    ..
    <form name="myform" action="" method="POST">
      <input type="button" onClick="goHere('c.jsp')" value="YES">
    </form>
    
    <script language="javascript">
            function goHere(url)
            {
                    window.location.replace(url);
            }
    </script>
    
    <!-- c.jsp ->
    ..
    <% response.sendRedirect("http://blahblah/any.pdf"); %>
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    It may be a bug in IE. However, a server-side solution is most reliable here.

    Comment

    Working...