Quote:
Originally Posted by pbmods
Heya, polymorphic.
I can't be positive, but perhaps it has something to do with the fact that you are using embed tags.
What would happen if you just set the src of the iframe to the URI of the PDF?
Um, you could be right. The pdfs cache when I open the html independently of the rest of the site. However, if I link to the html page then no caching. What is the difference?
Here is the changed script:
- <SCRIPT type="text/javascript">
-
-
var pageNo;
-
var nav;
-
pageNo = 1;
-
-
function makeIframe(nav) {
-
-
if (nav == "f")
-
{
-
if (pageNo < 102)
-
{
-
pageNo = pageNo + 1;
-
}
-
}
-
else if (nav == "b")
-
{
-
if (pageNo != 1)
-
{
-
pageNo = pageNo - 1;
-
}
-
}
-
else if (nav == "i")
-
{
-
pageNo = 2;
-
}
-
var iframe = document.createElement("IFRAME");
-
iframe.setAttribute("src", "/Catalog/Page_" + pageNo + ".pdf");
-
iframe.setAttribute("id", "contentFrom");
-
document.body.appendChild(iframe);
-
}
-
</SCRIPT>
The href link is in an includes file (which is called from an asp file) as follows:
- <!-- #include virtual="/includes/leftMenu.inc" -->
- <tr>
-
<td><a href="catalog.html" target = "_blank" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage('default_r3_c2','','images/default_r3_c2_f2.gif',1);"><img name="default_r3_c2" src="images/default_r3_c2.gif" width="160" height="40" border="0" alt=""></a></td>
-
</tr>
I do not understand why it makes a difference.