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

iframe not adjusting in a different viewport
https://www.tinywebgallery.com/forum/viewtopic.php?f=1&t=5732
Page 1 of 2

Author:  krysophylax [ 6. Feb 2019, 22:15 ]
Post subject:  iframe not adjusting in a different viewport

Hi. I used the example3 Use a different viewport after a user interaction. I have a login page and it goes to an admin page. But it seems the iframe is not adjusting after going to the admin page. The height and the width is adjusting but not the x and y position. And it is weird that the left side navigation of the admin page is not working. Is there any workaround on this? Thanks.

Author:  TinyWebGallery [ 7. Feb 2019, 20:04 ]
Post subject:  Re: iframe not adjusting in a different viewport

Are there any errors in the Javascript console?
normally after the viewport event the new settings are used. It is strange that only x and y do change. How looks your full configuration?

Best, Michael

Author:  krysophylax [ 12. Feb 2019, 03:52 ]
Post subject:  Re: iframe not adjusting in a different viewport

The javascript console error came out like this.

myview.php:138 Uncaught DOMException: Blocked a frame with origin "http://medicalinnovation.kr" from accessing a cross-origin frame.
at myNavigo (http://medicalinnovation.kr/admin/myview.php:138:10)
at HTMLDocument.<anonymous> (http://medicalinnovation.kr/admin/myview.php:135:3)
at l (http://medicalinnovation.kr/js/jquery-1.8.3.min.js:2:16996)
at Object.fireWith [as resolveWith] (http://medicalinnovation.kr/js/jquery-1.8.3.min.js:2:17783)
at Function.ready (http://medicalinnovation.kr/js/jquery-1.8.3.min.js:2:12504)
at HTMLDocument.A (http://medicalinnovation.kr/js/jquery-1.8.3.min.js:2:9909)

I am not an expert with php nor javascript so I have no idea what this means.

Author:  TinyWebGallery [ 12. Feb 2019, 09:23 ]
Post subject:  Re: iframe not adjusting in a different viewport

Hi, this means you use settings from the same domain although your iframe is on a different domain.

This is why I asked for your short code / configuration?

Please provide this.

Best, Michael

Author:  krysophylax [ 12. Feb 2019, 22:48 ]
Post subject:  Re: iframe not adjusting in a different viewport

Hi. Thank you for your quick response. This is the shortcode I provided.

They are coming from different domains.

[advanced_iframe securitykey="" src="http://medicalinnovation.kr/login.php" use_shortcode_attributes_only="true" id="example3" height="900" width="100%" show_part_of_iframe="true" show_part_of_iframe_x="0" show_part_of_iframe_y="90" show_part_of_iframe_width="100%" show_part_of_iframe_height="600" show_part_of_iframe_next_viewports="0,0,100%,800" show_part_of_iframe_next_viewports_loop="true"]

Author:  TinyWebGallery [ 13. Feb 2019, 20:20 ]
Post subject:  Re: iframe not adjusting in a different viewport

I don't get any error if I include this on a demo page.

but the width is the same and the height also almost. only show_part_of_iframe_y="90" moves a little bit.
And you should net set
show_part_of_iframe_next_viewports_loop="true"
this means that after each onload event the viewport switches back and forth...

Best, Michael

Author:  TinyWebGallery [ 13. Feb 2019, 22:03 ]
Post subject:  Re: iframe not adjusting in a different viewport

About the viewport. yes - you are right. There was a fix where I forgot to cover also the viewport. Please open

includes/advanced-iframe-main-css.php

and set in line 7
$fix_chrome_65 = false;

chrome is now version 72 so this should work fine..

Best, Michael

Author:  krysophylax [ 14. Feb 2019, 03:42 ]
Post subject:  Re: iframe not adjusting in a different viewport

Hi! The resizing works perfectly now!!!

But I am wondering, I have a left navigation on the website where it is transitioning but it seems it stopped working!
I can't click any of the buttons on the left menu.

Author:  krysophylax [ 14. Feb 2019, 03:43 ]
Post subject:  Re: iframe not adjusting in a different viewport

If you need the error from the console, here it is.


Uncaught DOMException: Blocked a frame with origin "http://medicalinnovation.kr" from accessing a cross-origin frame.
at myNavigo (http://medicalinnovation.kr/admin/myview.php:138:10)
at HTMLDocument.<anonymous> (http://medicalinnovation.kr/admin/myview.php:135:3)
at l (http://medicalinnovation.kr/js/jquery-1.8.3.min.js:2:16996)
at Object.fireWith [as resolveWith] (http://medicalinnovation.kr/js/jquery-1.8.3.min.js:2:17783)
at Function.ready (http://medicalinnovation.kr/js/jquery-1.8.3.min.js:2:12504)
at HTMLDocument.A (http://medicalinnovation.kr/js/jquery-1.8.3.min.js:2:9909)
myview.php:138 Uncaught DOMException: Blocked a frame with origin "http://medicalinnovation.kr" from accessing a cross-origin frame.
at myNavigo (http://medicalinnovation.kr/admin/myview.php:138:10)
at HTMLTableCellElement.onclick (http://medicalinnovation.kr/admin/myview.php:175:72)
3myview.php:138 Uncaught DOMException: Blocked a frame with origin "http://medicalinnovation.kr" from accessing a cross-origin frame.
at myNavigo (http://medicalinnovation.kr/admin/myview.php:138:10)
at HTMLTableCellElement.onclick (http://medicalinnovation.kr/admin/myview.php:180:72)
3myview.php:138 Uncaught DOMException: Blocked a frame with origin "http://medicalinnovation.kr" from accessing a cross-origin frame.
at myNavigo (http://medicalinnovation.kr/admin/myview.php:138:10)
at HTMLTableCellElement.onclick (http://medicalinnovation.kr/admin/myview.php:185:72)
2myview.php:138 Uncaught DOMException: Blocked a frame with origin "http://medicalinnovation.kr" from accessing a cross-origin frame.
at myNavigo (http://medicalinnovation.kr/admin/myview.php:138:10)
at HTMLTableCellElement.onclick (http://medicalinnovation.kr/admin/myview.php:190:72)

Author:  TinyWebGallery [ 14. Feb 2019, 10:28 ]
Post subject:  Re: iframe not adjusting in a different viewport

The error is something from your side. Because I used your shortcode and did not get any errors at all.
Have you checked what is in the lines shown above? Because I cannot access this page.

Best, Michael

Author:  krysophylax [ 15. Feb 2019, 00:47 ]
Post subject:  Re: iframe not adjusting in a different viewport

Hi Michael!

Actually this page is you need to login, and then when you login, it redirects to a page where there is a left navigation.
The left navigation doesn't work.

JQMIGRATE: Migrate is installed, version 1.4.1
(index):1 This page includes a password or credit card input in a non-secure context. A warning has been added to the URL bar. For more information, see https://goo.gl/zmWq3m.
myview.php:138 Uncaught DOMException: Blocked a frame with origin "http://medicalinnovation.kr" from accessing a cross-origin frame.
at myNavigo (http://medicalinnovation.kr/admin/myview.php:138:10)
at HTMLDocument.<anonymous> (http://medicalinnovation.kr/admin/myview.php:135:3)
at l (http://medicalinnovation.kr/js/jquery-1.8.3.min.js:2:16996)
at Object.fireWith [as resolveWith] (http://medicalinnovation.kr/js/jquery-1.8.3.min.js:2:17783)
at Function.ready (http://medicalinnovation.kr/js/jquery-1.8.3.min.js:2:12504)
at HTMLDocument.A (http://medicalinnovation.kr/js/jquery-1.8.3.min.js:2:9909)
(index):333 Uncaught TypeError: Cannot read property 'split' of undefined
at setNewViewPortexample3 ((index):333)
at modifyOnLoadexample3 ((index):316)
at HTMLIFrameElement.onload ((index):310)
3myview.php:138 Uncaught DOMException: Blocked a frame with origin "http://medicalinnovation.kr" from accessing a cross-origin frame.
at myNavigo (http://medicalinnovation.kr/admin/myview.php:138:10)
at HTMLTableCellElement.onclick (http://medicalinnovation.kr/admin/myview.php:175:72)


this is all that is written on the javascript console.

Author:  TinyWebGallery [ 17. Feb 2019, 22:50 ]
Post subject:  Re: iframe not adjusting in a different viewport

The last part
"Cannot read property 'split' of undefined
at setNewViewPortexample3 ((index):333)
at modifyOnLoadexample3"

seems to come from my code.

But
Blocked a frame with origin "http://medicalinnovation.kr" from accessing a cross-origin frame.
should be solved first. do you have a different iframe also?

Best, Michael

Author:  krysophylax [ 18. Feb 2019, 01:42 ]
Post subject:  Re: iframe not adjusting in a different viewport

Hi!

I see. That is actually the one and only I frame from my website. I'll try to explain further about this page with the iFrame. It is a Members Area page where there is a login.

Image

after logging in, if the user is admin, it redirects to the admin page which is this one.

Image

The only problem is the left navigation, the one that is boxed in red, it is not working. Other than that, the rest of the buttons are working.

Also, how can I prevent from my page mirroring my website after login? When the user is a normal user, and not an admin, it redirects to the home page. The thing is, for the first login, the iframe mirrors the whole website and not just the viewport.

Image

Thank you for your assistance.

Author:  krysophylax [ 18. Feb 2019, 01:46 ]
Post subject:  Re: iframe not adjusting in a different viewport

In addition to this,
when you refresh it, it works perfectly. it stopped mirroring the whole page.

Author:  TinyWebGallery [ 18. Feb 2019, 16:42 ]
Post subject:  Re: iframe not adjusting in a different viewport

With a screenshot i cannot see why it should not work. Also I don't understand what mirroring should mean. If the user is redirected somewhere also the iframe has now idea about this. then you only could add some code to the homepage to reirect out of the iframe. But as you don't have access this is not a option for you.

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