Search…

X3 Photo Gallery Support Forums

Search…
 
User avatar
TristanJo
Experienced
Topic Author
Posts: 116
Joined: 10 Apr 2018, 02:57

iframe resizer -.,-

05 Feb 2021, 05:46

I'm trying to automatically resize the external page using the iframe resizer
https://cdnjs.com/libraries/iframe-resizer
The height size doesn't resize automatically using iPhone safari,
but I don't know why. 
I'd appreciate it if you could give me a hint.
Code
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
    <script language="javascript" type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/iframe-resizer/4.2.11/iframeResizer.min.js"></script>
    <script type="text/javascript">
      $(function() {
        iFrameResize({
          checkOrigin: false
        });
      });
    </script>
Custom<head>
Code
<div style='height:100%;'>
<iframe src='//www.jlair.net/?agent_id=sks1162' frameBorder='0' width='100%' height='100%' scrolling='no' style='display:block;margin:0 auto' webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
</div>
Context code


Thank you~
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: iframe resizer -.,-

05 Feb 2021, 09:41

Can you be a bit more specific? Do you have a link? Does it work in all browsers except iPhone Safari? I can take a look, but I don't know if I can solve issues with with 3rd party plugins for you ... Who knows, maybe it's not possible to get the size in iOS Safari ...

I see you are loading jQuery, but jQuery is already included in X3 so you should leave it out ...
 
User avatar
TristanJo
Experienced
Topic Author
Posts: 116
Joined: 10 Apr 2018, 02:57

Re: iframe resizer -.,-

06 Feb 2021, 03:50

mjau-mjau wrote: Can you be a bit more specific? Do you have a link? Does it work in all browsers except iPhone Safari? I can take a look, but I don't know if I can solve issues with with 3rd party plugins for you ... Who knows, maybe it's not possible to get the size in iOS Safari ...

I see you are loading jQuery, but jQuery is already included in X3 so you should leave it out ...
http://www.jn-tour.com/airticket/
http://www.jn-tour.com/jejucoupon/

plz~~~:heart_eyes:
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: iframe resizer -.,-

06 Feb 2021, 04:33

:x: Iframe resizing does not seem to work.
:white_check_mark: Works

You also have many errors, although they might not be related to the reason the iframe resizer does not work.
Image

I can't really say much, because I don't know how it's supposed to work or if there are any restrictions. I can take a closer look if you can give me panel login if you like ... But without that, I can't guess my way to any solutions.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: iframe resizer -.,-

06 Feb 2021, 11:13

Looks like it works now? At least iframes display correctly here, also when you navigate to the pages from the menu:
http://www.jn-tour.com/airticket/
http://www.jn-tour.com/jejucoupon/

I remove the below from Settings > Custom > Custom Head. First of all, jQuery is not yet loaded when you try to trigger the function.
Code
<script type="text/javascript">
  $(function() {
    iFrameResize({
      checkOrigin: false
    });
});
</script>
Furthermore, you need to trigger the script on every page, not just once, but also when navigating from the X3 menu. Therefore I added the function inside the x3_load_page() function:
Code
function x3_load_page(){
  iFrameResize({
    checkOrigin: false
  });
}
If this plugin does not work for iOS Safari, you will have to ask the plugin author. I can't solve that. Set a CSS min-height for the iframe on small screens?
 
User avatar
TristanJo
Experienced
Topic Author
Posts: 116
Joined: 10 Apr 2018, 02:57

Re: iframe resizer -.,-

06 Feb 2021, 21:33

mjau-mjau wrote: 지금 작동하는 것 같나요? 최소한 iframe이 여기에 표시되고 메뉴에서 페이지로 실행될 때도 표시됩니다.
http://www.jn-tour.com/airticket/
http://www.jn-tour.com/jejucoupon/ 아래

를 제거합니다. 설정> 사용자 지정> 사용자 지정 헤드에서. 우선, jQuery가 아직 검증되지 않을 가능성이 있습니다. 또한 한 번뿐 아니라 X3 메뉴에서 탐색 할 때도 모든 페이지에서 펼쳐서 트리거해야합니다. 따라서 x3_load_page () 함수 함수를 추가했습니다. 이 플러그인이 iOS Safari에서 작동하지 플러그인 플러그인에게 문의해야합니다. 나는 그것을 할 수 없습니다. 작은 화면에서 iframe의 CSS 최소 높이를 설정 하시겠습니까?
Code
<script type="text/javascript">
  $(function() {
    iFrameResize({
      checkOrigin: false
    });
});
</script>
Code
function x3_load_page(){
  iFrameResize({
    checkOrigin: false
  });
}
대단히 감사합니다.
iOS safari에서는 화면이 다르게 표시됩니다.

http://www.jn-tour.com/img/ios.mov
이 비디오를보세요.

두 번째 탭.
https://www.jlair.net/waiting/

iOS Safari에서 iframe을 적용하면 위의 페이지가 다르게 보입니다.
이유를 모르겠습니다.

[첨부 파일 = 0] IMG_9891.jpg [/ 첨부 파일]
Attachments
IMG_9891.jpg
IMG_9891.jpg (703.76 KiB) Viewed 2758 times
Last edited by TristanJo on 06 Feb 2021, 23:08, edited 1 time in total.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: iframe resizer -.,-

06 Feb 2021, 22:04

I'm not sure what you want me to do. You are using iframe with external (non-X3) websites and resizing the iframe with an external plugin. If you can't get it to work with iOS Safari, then ask the plugin developer? I can't solve this for you, because it has nothing to do with X3, and I don't know the code or how it's supposed to work. Iframe is not the best idea in the first place because of sizing and scrollbar issues.
 
User avatar
TristanJo
Experienced
Topic Author
Posts: 116
Joined: 10 Apr 2018, 02:57

Re: iframe resizer -.,-

06 Feb 2021, 23:09

mjau-mjau wrote: I'm not sure what you want me to do. You are using iframe with external (non-X3) websites and resizing the iframe with an external plugin. If you can't get it to work with iOS Safari, then ask the plugin developer? I can't solve this for you, because it has nothing to do with X3, and I don't know the code or how it's supposed to work. Iframe is not the best idea in the first place because of sizing and scrollbar issues.
Yes, thank you so much.
I'll ask my partner
Have a nice day.
 
User avatar
TristanJo
Experienced
Topic Author
Posts: 116
Joined: 10 Apr 2018, 02:57

Re: iframe resizer -.,-

06 Feb 2021, 23:56

TristanJo wrote:
mjau-mjau wrote: I'm not sure what you want me to do. You are using iframe with external (non-X3) websites and resizing the iframe with an external plugin. If you can't get it to work with iOS Safari, then ask the plugin developer? I can't solve this for you, because it has nothing to do with X3, and I don't know the code or how it's supposed to work. Iframe is not the best idea in the first place because of sizing and scrollbar issues.
Yes, thank you so much.
I'll ask my partner
Have a nice day.
I found it!

The partner's code was on the relative path
Code
<script src="/_common/js/iframeResizer/iframeResizer.contentWindow.min.js?v=20200624143140"></script>
Thanks a lot.