p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Javascript (http://p2p.wrox.com/forumdisplay.php?f=85)
-   -   Access denied error (Needs Print functionality) (http://p2p.wrox.com/showthread.php?t=24637)

agg_rohit January 27th, 2005 11:23 AM

Access denied error (Needs Print functionality)
 
I want to print different domain's pages print that are opened in Iframe.
I need some solution regarding this.
I am not able to find any solution till now. I am getting "denied access error" .Want to get print of google.com's page.

I created simple 3 files started.html,A.html,B.html
*********
started.html
<HTML>
<HEAD>
<script>
function PrintFrame()
{
  windowrames["A"].focus();
window.frames["A"].print();

}
</script>
</HEAD>

<BODY>

</BODY>
</HTML>
<A HREF="#" onclick="PrintFrame()">Print</A>
<IFRAME SRC="A.html" NAME="A" ></IFRAME>

<br><br><br><br><A HREF="B.html" target=A>Click here</A>
*************
*************
A.html
<HTML>
<BODY>
Here i am in window A <a href=http://google.com>google</a>
</BODY>
</HTML>
*************
*************
B.html
<HTML>
<BODY>
Here i am in window B <a href=http://google.com>google</a>
</BODY>
</HTML>



joefawcett January 27th, 2005 03:04 PM

Presumably this is another security feature.

The only workarounds I can think of would be either use msxml2.xmlhttp class to fetch the page and then load the results into your own page to print or to use Google's web service to get results.



--

Joe (Microsoft MVP - XML)


All times are GMT -4. The time now is 03:46 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.