James Bachini

iframe to a specific div id on a landing page

Below is the code to iframe an offer page but cut out all the stuff you don’t need. This is useful if you just want to iframe the form while using your own images etc. This is setup so you just enter the url and div id you want to jump to at the top of the php page. The height and width of the iframe can be adjusted further down. Positioning can be achieved with CSS if need be. It’s pretty simple when you know how but it took me a while to figure out how to do this, I was trying javascript onload commands and hiding buttons etc. Keep it simple stupid! Tested in Chrome, IE and Firefox

$out = 'http://trk.cpaoffer.com/?a_ref=jimam';
$divid = 'user-form';
<iframe src="<?php echo $out.'#'.$divid; ?>" name="target-iframe" height="200px" width="500px"></iframe>

Get The Blockchain Sector Newsletter, binge the YouTube channel and connect with me on Twitter

The Blockchain Sector newsletter goes out a few times a month when there is breaking news or interesting developments to discuss. All the content I produce is free, if you’d like to help please share this content on social media.

Thank you.

James Bachini

Disclaimer: Not a financial advisor, not financial advice. The content I create is to document my journey and for educational and entertainment purposes only. It is not under any circumstances investment advice. I am not an investment or trading professional and am learning myself while still making plenty of mistakes along the way. Any code published is experimental and not production ready to be used for financial transactions. Do your own research and do not play with funds you do not want to lose.