Home News Contact Us Forum About Us Demos Products F.A.Q.
Shopping Cart
You currently have 0 items in your cart.


Recent Events
  • 31/12/2023 New Year SALE

    We are glad to announce New Year SALE. 25% discount for all our extensions. Use NY24 coupon code. Hurry up the discount is valid till 7 January.

  • 21/11/2023 BLACK FRIDAY 23 is coming

    BIG SALE, 35% discount for all our extensions. Use BF23 coupon code. Hurry up the discount is valid till 27 November.


2Checkout.com, Inc. is an authorized retailer of goods and services provided by ARI Soft. 2CheckOut




Follow us on twitter



Welcome, Guest
Please Login or Register.    Lost Password?

print iFrame in embedded doc
(1 viewing) (1) Guest
Go to bottomPage: 12
TOPIC: print iFrame in embedded doc
#58473
print iFrame in embedded doc 7 Years, 7 Months ago Karma: 0
Hello

I'm using Ari-Smart content to display embedded doc in iFrame.

I want to add to each embedded doc a print button, that only prints that specific doc!

What's the best way to do so?

Thank you in advance!

Best regards
Laurent Zotto
The administrator has disabled public write access.
 
#58474
Re:print iFrame in embedded doc 7 Years, 7 Months ago Karma: 747
Hello,

You can add a print button outside <IFRAME> and attach the following javascript to it:

Code:


window.frames['FRAME_NAME'].focus();window.frames['FRAME_NAME'].print();



Just replace FRAME_NAME with name of <IFRAME> element. A sample button:

Code:


<button onclick="window.frames['embed_doc'].focus();window.frames['embed_doc'].print();">Print</button>



Regards,
ARI Soft
The administrator has disabled public write access.
 
#58475
Re:print iFrame in embedded doc 7 Years, 7 Months ago Karma: 0
Hello

I tried this, it does not work. I get the button, but it's not opening a printing dialog when pressed!

I also tried to add this to the html code attached.. same print behaviour as above
Here is my original code:

Code:

<p>{aridoc engine="iframe" width="100%"}/joomla/import_fltt/Fengig_1_CH_SEN_ranking.html{/aridoc}</p>
<hr />
<p>{aridoc engine="iframe" width="100%"}/joomla/import_fltt/Fengig_1_CHALL_ranking.html{/aridoc}</p>



Attached is the files: Fengig_1_CH_SEN_ranking.html
the 2nd file is blank for this team

I tried in joomla on the article Options to state show print button, this does not work either!

I also tried to add this to the html code attached.. same print behaviour as above
The administrator has disabled public write access.
 
#58477
Re:print iFrame in embedded doc 7 Years, 7 Months ago Karma: 747
Send a link to a page where we can see the problem with "Print" button.

Regards,
ARI Soft
The administrator has disabled public write access.
 
#58479
Re:print iFrame in embedded doc 7 Years, 7 Months ago Karma: 0
The administrator has disabled public write access.
 
#58480
Re:print iFrame in embedded doc 7 Years, 7 Months ago Karma: 747
The button is located on a page inside <IFRAME> element. In this case the following code can be used for the button:

Code:


<button onclick="window.print();">Print</button>



Regards,
ARI Soft
The administrator has disabled public write access.
 
Go to topPage: 12