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

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -