jquery - onclick print content which inside the iframe -
i facing problem on print content inside iframe.
this anchor tag outside iframe :
<a href=”#” onclick='window.print()' >print</a>
here iframe
<iframe name="newtest" src="https:xyz.com" ></iframe>
i want print page inside iframe on click of anchor tag outside iframe
<iframe src="" id="iframeid"></iframe> document.getelementbyid("iframeid").contentwindow.print();
if trying print remote site, can't in way.
if http://yoursite.org
, iframe <iframe src="http://google.com">
can't that, site domain must match
instead if page local page <iframe src="page.htm">
work
Comments
Post a Comment