Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum
https://www.tinywebgallery.com/forum/

iFrame Pro
https://www.tinywebgallery.com/forum/viewtopic.php?f=21&t=4434
Page 1 of 1

Author:  mhdslg [ 19. Sep 2017, 21:06 ]
Post subject:  iFrame Pro

Hi

I'm a happy user of your Pro version

It worked well at my develope site http://dev.rgd.dk/wordpress/ (not there any more)
Iframed pages worked well with 100% hight and the URL was written so it was possible to bookmake a specific page with a specific iframe page

Today the site went live and was moved to http://rgd.dk by my hosting company

Now the it is not working ;o(

Here is the WP page: http://rgd.dk/puljer-og-stilling-vest-abcd/

I changed nothing in the setup and on the WP page
Here is the code
Code:
[advanced_iframe securitykey="MY_KEY" src="http://westabcd.regionsgolf-danmark.dk/pages/kampprogram/iframe/default.aspx" width="100%" height="100%" map_parameter_to_url="page" add_iframe_url_as_param="remote"add_iframe_url_as_param_prefix="westabcd.regionsgolf-danmark.dk/pages/kampprogram/iframe/"]



Here is the page to be IFRAMED: http://westabcd.regionsgolf-danmark.dk/pages/kampprogram/iframe/default.aspx
in this file I changed this
Code:
<script>
var updateIframeHeight = "true";
var add_iframe_url_as_param="remote";
</script>
<script src="http://dev.rgd.dk/wordpress/wp-content/plugins/advanced-iframe/js/ai_external.js"></script>


To this
Code:
<script>
   var updateIframeHeight = "true";
   var keepOverflowHidden = "false";
</script>
<script src="http://rgd.dk/wp-content/plugins/advanced-iframe/js/ai_external.js"></script>


What am I missing

Author:  TinyWebGallery [ 20. Sep 2017, 09:27 ]
Post subject:  Re: iFrame Pro

Seems right now you have a different configuration. On http://rgd.dk/puljer-og-stilling-vest-abcd/
I get:
Advanced iframe configuration error: You have enabled the resize of the iframe for pages on the same domain. But you use an iframe page on a different domain. You need to use the external workaround like described in the settings. Also check the next log. There the browser message for this error is displayed.

Also it seems you still use the iframe setup for communication. Please switch to postMessage and set this to debug in the administration.

Best, Michael

Author:  mhdslg [ 20. Sep 2017, 09:43 ]
Post subject:  Re: iFrame Pro

Hi

Thanks for reply

Woke up in the night with an idea

The JS file was still pointing to dev.rgd.dk/wordpress

After saving it in setup and clear cache it now works fint

http://rgd.dk/puljer-og-stilling-oest/=east.regionsgolf-danmark.dk%2Fpages%2Fkampprogram%2Fiframe%2Fmatchprogrambymatchid.aspx%3Fteamid%3D611

I will have a look at what you wrote

Thanks again

Author:  TinyWebGallery [ 20. Sep 2017, 10:32 ]
Post subject:  Re: iFrame Pro

Only check the javascript console always. aip will tell you many config errors here.

Best Michael

Author:  mhdslg [ 28. Sep 2017, 15:00 ]
Post subject:  Re: iFrame Pro

Hi again

I think I got most of it to work on http://rgd.dk/puljer-og-stilling-oest/

But when I click around on the iframe page the URL changes - and that is ok

http://rgd.dk/puljer-og-stilling-oest/?=matchprogramrows.aspx%3Frow%3DD

But that url is not working now

I was working on the develop site.

Please advice

Author:  TinyWebGallery [ 28. Sep 2017, 15:13 ]
Post subject:  Re: iFrame Pro

please post your current config.

Best, michael

Author:  mhdslg [ 28. Sep 2017, 15:42 ]
Post subject:  Re: iFrame Pro

Is it the JS file ?

Author:  mhdslg [ 28. Sep 2017, 15:44 ]
Post subject:  Re: iFrame Pro

// Variables are checked with typeof before because this enables that the user can
// define this values before and after including this file and they don't have to set
// them at all if not needed.
if (typeof iframe_id === 'undefined') {
var iframe_id_advanced_iframe = "advanced_iframe";
} else {
var iframe_id_advanced_iframe = iframe_id;
}

var iframe_advanced_iframe_last_height = -1

if (typeof iframe_url_id === 'undefined') {
var iframe_url_id = "";
}
// multisite support
if (typeof domainMultisite === 'undefined') {
var domainMultisite = "false";
}
if (typeof post_message_domain === 'undefined') {
var post_message_domain = "http://rgd.dk";
}
if (domainMultisite == 'true') {
// Check the referer
var ref = document.referrer;
// If found we exchange the domain.
if (ref != "") {
var domainOrig = domain_advanced_iframe.split('/')[2];
var multiDomain = ref.split('/')[2];
domain_advanced_iframe = domain_advanced_iframe.replace(domainOrig, multiDomain);
}
post_message_domain = "*";
}

if (typeof usePostMessage === 'undefined') {
var usePostMessage = false;
}
if (typeof debugPostMessage === 'undefined') {
var debugPostMessage = false;
}
if (typeof dataPostMessage === 'undefined') {
var dataPostMessage = '';
}

if (iframe_url_id != "") {
var value_id = aiGetUrlParameter(iframe_url_id);
if (value_id != "") {
iframe_id_advanced_iframe = value_id;
} else {
var errorText = 'Configuration error: The id cannot be found in the url at the configured parameter.';
alert(errorText);
throw errorText;
}
}
if (typeof updateIframeHeight === 'undefined') {
var updateIframeHeight = "true";
}
if (typeof onload_resize_delay === 'undefined') {
var onload_resize_delay = 0;
}
if (typeof keepOverflowHidden === 'undefined') {
var keepOverflowHidden = "false";
}
if (typeof hide_page_until_loaded_external === 'undefined') {
var hide_page_until_loaded_external = "false";
}
if (typeof iframe_hide_elements === 'undefined') {
var iframe_hide_elements = "";
}
if (typeof onload_show_element_only === 'undefined') {
var onload_show_element_only = "";
}
if (typeof iframe_content_id === 'undefined') {
var iframe_content_id = "";
}
if (typeof iframe_content_styles === 'undefined') {
var iframe_content_styles = "";
}
if (typeof change_iframe_links === 'undefined') {
var change_iframe_links = ""
}
if (typeof change_iframe_links_target === 'undefined') {
var change_iframe_links_target = "";
}
if (typeof additional_js_file_iframe === 'undefined') {
var additional_js_file_iframe = "";
}
if (typeof additional_js_iframe === 'undefined') {
var additional_js_iframe = '';
}
if (typeof additional_css_file_iframe === 'undefined') {
var additional_css_file_iframe = "";
}
if (typeof iframe_redirect_url === 'undefined') {
var iframe_redirect_url = "";
}
if (typeof enable_responsive_iframe === 'undefined') {
var enable_responsive_iframe = "false";
}
if (typeof write_css_directly === 'undefined') {
var write_css_directly = 'false';
}
if (typeof resize_on_element_resize === 'undefined') {
var resize_on_element_resize = '';
}
if (typeof resize_on_element_resize_delay === 'undefined') {
var resize_on_element_resize_delay = '250';
}
if (typeof add_iframe_url_as_param === 'undefined') {
var add_iframe_url_as_param = 'remote';
}
if (typeof element_to_measure === 'undefined') {
var element_to_measure = 'default';
}
if (typeof element_to_measure_offset === 'undefined') {
var element_to_measure_offset = 0;
}
// This is a feature only mentioned in the readme.txt as it was only needed for a custom solution.
if (typeof additional_styles_wrapper_div === 'undefined') {
var additional_styles_wrapper_div = '';
}
if (typeof add_css_class_iframe === 'undefined') {
var add_css_class_iframe = 'false';
}

// read optional jquery and resize on element resize paths!
if (typeof jquery_path === 'undefined') {
var jquery_path = 'http://rgd.dk/wp-includes/js/jquery/jquery.js';
}

var iframeWidth = 0;
var ia_resize_init_done_advanced_iframe = false;

// redirect to a given url if the page is NOT in an iframe
if (iframe_redirect_url != "") {
if (window==window.top) { /* I'm not in a frame! */
/* Add existing parameters */
if ("" != window.location.search && iframe_redirect_url.indexOf("?") ==-1) {
iframe_redirect_url += window.location.search;
}
location.replace(iframe_redirect_url);
}
}

// load jQuery if not available
window.jQuery || document.write("<script src='" + jquery_path + "'></script>");

// if responsive is enabled auto height has to be enabled as well.
if (enable_responsive_iframe == 'true') {
updateIframeHeight = 'true';
}

if (typeof ia_already_done === 'undefined') {
if (window!=window.top) { /* I'm in a frame! */
// dom is not fully loaded therefore jQuery is not used to hide the body!
if (iframe_hide_elements != "" || onload_show_element_only != "" ||
iframe_content_id != "" || iframe_content_styles != "") {
if (document.documentElement && write_css_directly == 'false') {
document.documentElement.style.visibility = 'hidden';
}
// Solution if you want to remove the background but you see it for a very short time.
// because hiding the iframe content does not help!
//if (window != window.top) {
// document.write("<style>body { background-image: none; }</style>");
//}
}
}
var ia_already_done = false;
}

// add the aiUpdateIframeHeight to the onload of the site.
addOnloadEvent(aiExecuteWorkaround_advanced_iframe);

if (write_css_directly == 'true' && window!=window.top) {
writeCssDirectly();
}
if (additional_css_file_iframe != '' && window!=window.top) {
document.write('<link rel="stylesheet" type="text/css" href="' + additional_css_file_iframe + '"/>');
}
if (additional_js_file_iframe != '' && window!=window.top) {
document.write("<script src='"+additional_js_file_iframe+"'></script>");
}
if (additional_js_iframe != '' && window!=window.top) {
document.write("<script>" + additional_js_iframe + "<\/script>");
}
}

Author:  mhdslg [ 28. Sep 2017, 15:54 ]
Post subject:  Re: iFrame Pro

And the shortcode

[advanced_iframe securitykey="MY_KEY" use_shortcode_attributes_only="true" src="http://east.regionsgolf-danmark.dk/pages/kampprogram/iframe/default.aspx" width="100%" height="100%" scrolling="no" enable_ios_mobile_scolling="true" id="advanced_iframe" add_iframe_url_as_param="remote" add_iframe_url_as_param_prefix="east.regionsgolf-danmark.dk/pages/kampprogram/iframe/" onload_resize="true" resize_on_ajax_jquery="false" add_document_domain="true" ]

Author:  TinyWebGallery [ 1. Oct 2017, 12:11 ]
Post subject:  Re: iFrame Pro

Please remove

onload_resize="true" resize_on_ajax_jquery="false" add_document_domain="true"

You get error messages because this settings are for the same domain.

AND

map_parameter_to_url is missing!

Please see:
http://www.tinywebgallery.com/blog/advanced-iframe/advanced-iframe-pro-demo/add-iframe-url-to-parent/add-iframe-url-as-param-remote-domain

Best, Michael

Author:  mhdslg [ 1. Oct 2017, 13:20 ]
Post subject:  Re: iFrame Pro

Thank you

Working perfect now.

Super service - have a nice sunday :D

Page 1 of 1 All times are UTC + 1 hour [ DST ]
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/