WebDev - IFrame usage

WebDev - IFrame usage

Posted By: pmietlicki

Published to WebDev on Apr 28, 2017

If you'd like to print a PDF file inside an area on your page, you could use an iframe.

The corresponding HTML code :

<code></code><iframe src="<a href="http://pascal-mietlicki.fr/kdb">http://pascal-mietlicki.fr/</a>" height="1600" width="100%" frameborder="0" scrolling="no"></iframe>

The IFrame component already exist under WebDev.

To interact with this component, you'll have to add a button and change its description (inside the Destination part) to use the IFrame :

For example, if you want to display a PDF file using this button inside the IFrame, you can use this code inside the "click" event of the button :

iDestination(iPDF, CompleteDir(fDataDir())+"File.PDF")
// If you have a parameterized query
iInitReportQuery(STATE,param)
iPrintReport(STATE_Drac_Budget)
FileDisplay(iLastFile(),"application/pdf")

This code will execute inside the IFrame linked to the button.

Tags: iFrame, WebDev

Archive