SimplePortal
Support => English Support => Topic started by: SeeingBlue on December 15, 2014, 04:04:41 PM
-
I'm using an iframe inside one of your HTML blocks to display some dynamic content. So I need this Iframe to resize based on the content. This can be achieved using David J. Bradshaw's Iframe-Resizer but it requires that I load some custom javascript files.
iframe.js
iframeResizer.contentWindow.min.js
iframeResizer.min.ja
I had this working properly in Wordpress. How do I do it properly for SMF/SimplePortal? Please be thorough, I'm not very savvy but I can follow directions.
-
Can't you load them via the HTML itself? :)
-
SeeingBlue,
I will assume this is using a HTML block.
You should use the full URL's of the file paths (including http:// if you wish) but I will just post this example of them being in the main directory. Place your iframe code after these file calls.
<script type="text/javascript" src="/iframe.js"></script>
<script type="text/javascript" src="/iframeResizer.contentWindow.min.js"></script>
<script type="text/javascript" src="/iframeResizer.min.ja"></script>
-
The only reason why I didn't post the snippet is because he could have easily googled it with my advice ;) so why didn't I post it? Because it's much more satisfying and better to learn a bit by doing stuff on our own - but again why? Because if he has problems again then he will always have to ask and depend on somebody else (and maybe wait a long time and have his website bugged or, worse, down), instead if he knows already how to fix the stuff he won't be in that condition.
Said that, it will work indeed. :)
-
That didn't work.
-
I got it working. Had to load one of them after the iframe.
I've also had such a terrible time making post. Keep getting 500 server errors.