Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum

Get help for TinyWebGallery, the best image gallery. The forum is also home for the Joomla JFUploader, TWG Flash Uploader and the Wordpress flash uploader.
It is currently 28. Mar 2024, 12:55

This forum is readonly now. Please use the new forum if you don't find the answer to your question here. The new forum is at https://www.tinywebgallery.com/blog/forum/


All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: 10. Jan 2017, 18:36 
Offline

Joined: 10. Jan 2017, 18:15
Posts: 3
Hello, I've implemented an iframe with Advanced Iframe plugin in my web site: http://portabicis.com/buscador-de-compatibilidad/. The page displayed in the iframe is in a different domain (http://www.todosoportes.com) and I'd like to modify the its targets links, to be displayed as _top. I've configure Advanced Iframe Change iframe links and Change iframe links target parameters this way:

Change iframe links: .NavBarTop a
Change iframe links target: _top

But it doesn't work. Can you help me, please?

Thanks


Top
 Profile  
 
PostPosted: 10. Jan 2017, 19:53 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
you are not on the same domain. Therefore you need to use the external workaround.

Best, Michael


Top
 Profile  
 
PostPosted: 11. Jan 2017, 11:31 
Offline

Joined: 10. Jan 2017, 18:15
Posts: 3
Hi Michael, thanks for your quick answer. I've configured in parent page (portabicis.com) the Advanced Iframe setting as I say you in the previous message:

Change iframe links: .NavBarTop a
Change iframe links target: _top

.NavBarTop is the class of iframe pages menu's div


After that, I've included this script in the iframe page, in (todosoportes.com):

<script>
var iframe_redirect_url = "http://www.todosoportes.com";
var change_iframe_links = ".NavBarTop a";
var change_iframe_links_target = "_top";
</script>
<script src="http://portabicis.com/wp-content/plugins/advanced-iframe/js/ai_external.js"></script>

But it doesn't work, could you tell me what is wrong?


Regards
Xatucans


Top
 Profile  
 
PostPosted: 12. Jan 2017, 11:49 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
I'll take a look tonight...


Top
 Profile  
 
PostPosted: 12. Jan 2017, 23:13 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
The problem is that the included page is https but you main page is http.
therefore the ai_external.js is loaded from a http site which is not allowed in https pages.
You see the error messages if you press f12 an check the console log.

You can
- Include the http version of the other page.
- Or you need to make it like here: http://www.tinywebgallery.com/blog/advanced-iframe/advanced-iframe-pro-demo/external-workaround-with-post-message#e53

Best, Michael


Top
 Profile  
 
PostPosted: 13. Jan 2017, 11:45 
Offline

Joined: 10. Jan 2017, 18:15
Posts: 3
Thank you very much for your answer. I've changed bestskiracks.com ai_external.js to a secure server:

https://bestskiracks.com/wp-content/plugins/advanced-iframe/js/ai_external.js

but i doesn't work. If I look at the console I can see now this error:

DOMException: Failed to read the 'contentDocument' property from 'HTMLIFrameElement': Blocked a frame with origin "http://portabicis.com" from accessing a cross-origin frame.
at contents (http://portabicis.com/wp-includes/js/jquery/jquery.js?ver=1.12.4:2:26887)
at Function.map (http://portabicis.com/wp-includes/js/jquery/jquery.js?ver=1.12.4:2:3613)
at a.fn.init.n.fn.(anonymous function) [as contents] (http://portabicis.com/wp-includes/js/jquery/jquery.js?ver=1.12.4:2:27001)
at aiModifyIframe_advanced_iframe (http://portabicis.com/buscador-de-compatibilidad/:411:560)
at HTMLIFrameElement.onload (http://portabicis.com/buscador-de-compatibilidad/:423:782)


I've copied jquery.js and jquery.ba-resize.min.js to the same directory in the secure server and changed jquery_path and resize_path in ai_external.js document to the new locations, but the error persist. Could you help me please?

Thanks again
Regards
Xatu


Top
 Profile  
 
PostPosted: 13. Jan 2017, 18:23 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
The important setting is
var usePostMessage = true;
var domainMultisite = true;

because then the js does not try to callback the configured server but only the parent (and does not care where this is).

make it simpler - go to the administration and use post message communication and domain multisite! This is than saved to ai_external.js and also your wordpress is configured right!

then copy the ai_external.js again.

But is seems you have changed http://www.todosoportes.com - then you don't need the whole copy thing.
have you done both changes? because you only have to to one or the other...

also how looks your shortcode? because there are configuration errors also displayed in the log.

Best, Michael


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 22 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
powered by phpbb | Datenschutz/ Privacy policy