Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Help with iframe code...

Featured Replies

Im using an iframe on a Magento site to show a wordpress portfolio.

Don't want to use the normal magento/WP integration as that prevents me using the WP template and some features.

 

Have got it all working, also not showing the scroll bar yet still allowing to scroll, looks good.

Only thing I need to find to work is that when I click on a portfolio link in the WP iframe, I need it to open in a new window, not still within the iframe... any suggestions? the code Im using is below.

 

<script type='text/javascript'>
$(function(){
var iFrames = $('iframe');
function iResize() {
for (var i = 0, j = iFrames.length; i < j; i++) {
iFrames.style.height = iFrames.contentWindow.document.body.offsetHeight + 'px';}
}
if ($.browser.safari || $.browser.opera) {
iFrames.load(function(){
setTimeout(iResize, 0);
});
for (var i = 0, j = iFrames.length; i < j; i++) {
var iSource = iFrames.src;
iFrames.src = '';
iFrames.src = iSource;
}
} else {
iFrames.load(function() {
this.style.height = this.contentWindow.document.body.offsetHeight + 'px';
});
}
setInterval(iResize, 1000);
});
</script>
<iframe src="/blog2/" class="iframe" width=100% height=100% scrolling="no" frameborder="0"></iframe>
This is entered into HTML CMS block within Magento, and shows the WP portfolio page within the Mag template.
any help to get it to open portfolio's in a new page would be greatly appreciated!
Thanks in advance (hopefully!)

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.