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

Mobile issue using auto zoom iframe on a remote domain
https://www.tinywebgallery.com/forum/viewtopic.php?f=21&t=4206
Page 1 of 1

Author:  Seppo [ 19. Jan 2017, 00:07 ]
Post subject:  Mobile issue using auto zoom iframe on a remote domain

I'm having real problems getting auto zoom to work on mobile browsers; I'm a noob so I'm guessing it's me rather than the plugin!

My page at http://seppo.co.uk/about/#1483712972005-6d7a7ede-084f has a script hosted on a remote domain and whilst it displays ok on a desktop, I can't get it to work on mobile browsers; basically I want it to zoom nicely and show all at a size that means there's no horizontal scrolling. Instead, nothing is showing on mobiles. What am I doing wrong?

My plugin has the following:

Code:
[advanced_iframe securitykey="my_key" src="http://lawquotes.co.uk/quotes/seppo/default.asp" use_shortcode_attributes_only="true" id="advanced_iframe_31" auto_zoom="remote" width="100%" height="1250" enable_responsive_iframe="true" pass_id_by_url="ai_id"]


I have the following in the header on my asp page on the remote domain:
Code:
<script>
var iframe_id = "advanced_iframe_31";
var updateIframeHeight = "true";
var hide_page_until_loaded_external = "true";
var iframe_url_id ='ai_id';
</script>
<script src="http://www.tinywebgallery.com/blog/wp-content/plugins/advanced-iframe/js/ai_external.js"></script>
<script>document.domain='www.seppo.co.uk';</script>

Any help gratefully received!

Seppo

Author:  TinyWebGallery [ 19. Jan 2017, 14:30 ]
Post subject:  Re: Mobile issue using auto zoom iframe on a remote domain

What are the default settings in your config? (press on create shortcode on the basic tab and post this).

Because the remote script does not know (yet) when to send updates for the size!

auto_zoom="remote" enable_responsive_iframe="true"
have also to be known for the external script.

also you include my script!

<script src="http://www.tinywebgallery.com/blog/wp-content/plugins/advanced-iframe/js/ai_external.js">

you need to include YOURS like shown on the "external workaround" tab.
http://seppo.co.uk/wp-content/plugins/advanced-iframe/js/ai_external.js
maybe...

Also
<script>document.domain='www.seppo.co.uk';</script>
does not make sense as you are NOT on a sub domain but a completely different!

Best, Michael

Author:  Seppo [ 20. Jan 2017, 01:08 ]
Post subject:  Re: Mobile issue using auto zoom iframe on a remote domain

Thanks for getting back to me; I think I'm a bit further forward :D

My shortcode is:

Code:
[advanced_iframe securitykey="my_key" use_shortcode_attributes_only="true" src="http://lawquotes.co.uk/quotes/conveyancinglawyers" width="100%" scrolling="no" id="advanced_iframe" enable_responsive_iframe="true" add_css_class_parent="true" add_css_class_iframe="true" resize_on_ajax_jquery="false" add_document_domain="true" enable_external_height_workaround="true" ]


My external page now has the following in the <head> tags:

Code:
<script src="http://seppo.co.uk/wp-content/plugins/advanced-iframe/js/ai_external.js"></script>
<script>document.domain='www.lawquotes.co.uk';</script>


(seppo is my WP domain, the external page is on lawquotes)

On a desktop browser it sort of works, but not on a mobile one. Am I still missing something?

thanks

Seppo

Author:  TinyWebGallery [ 20. Jan 2017, 02:21 ]
Post subject:  Re: Mobile issue using auto zoom iframe on a remote domain

you are getting closer :).

remove
<script>document.domain='www.lawquotes.co.uk';</script>
as this does not make sense for your setup.

now you have to configure ai_external.js!!

In the administration all settings that have a "save icon" are saved to this file!

So http://www.tinywebgallery.com/blog/advanced-iframe/advanced-iframe-pro-demo/auto-zoom-iframe-content#e31
is what you need.

It is important that you enable the auto height on the external workaround tab and save it! you have done this already.

So with your current ai_external.js use

[advanced_iframe securitykey="my_key" src="http://lawquotes.co.uk/quotes/seppo/default.asp" use_shortcode_attributes_only="true" id="advanced_iframe" auto_zoom="remote" width="100%" height="1250" enable_responsive_iframe="true"]

Where is the iframe parent?

Best, Michael

Author:  Seppo [ 20. Jan 2017, 16:53 ]
Post subject:  Re: Mobile issue using auto zoom iframe on a remote domain

Thanks; not at my computer at the moment but the iframe parent is on http://seppo.co.uk/about/#1483712972005-6d7a7ede-084f in the Sell & Purchase tab.

Author:  TinyWebGallery [ 21. Jan 2017, 04:29 ]
Post subject:  Re: Mobile issue using auto zoom iframe on a remote domain

check the error console of your browser:

"advanced iframe configuration error: The id of the parent and the external workaround are different! Check your settings."

Please start simple. Most likely you only use 5% of the settings!
check my latest post.

Best, Michael

Author:  Seppo [ 23. Jan 2017, 23:58 ]
Post subject:  Re: Mobile issue using auto zoom iframe on a remote domain

Thanks again have changed the id now; getting a bit further now but still not getting the mobile view to zoom correctly - the iframe scrolls side to side:

Code:
[advanced_iframe securitykey="mykey" src="http://lawquotes.co.uk/quotes/seppo/default.asp" enable_external_height_workaround="true" use_shortcode_attributes_only="true" id="advanced_iframe" auto_zoom="remote" width="150%" height="1250" enable_responsive_iframe="true" pass_id_by_url="ai_id"]


Should that happen?

Calum

Author:  Seppo [ 7. Feb 2017, 22:47 ]
Post subject:  Re: Mobile issue using auto zoom iframe on a remote domain

I still haven't been able to get this sorted; any ideas what I'm doing wrong please?

Author:  TinyWebGallery [ 13. Feb 2017, 10:15 ]
Post subject:  Re: Mobile issue using auto zoom iframe on a remote domain

Why do you use width 150%? This does not make sense to me. Especially when you enable zoom which always tries to zoom to 100% width.

Best, Michael

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