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

Advanced iframe parent page links
https://www.tinywebgallery.com/forum/viewtopic.php?f=21&t=4618
Page 1 of 3

Author:  chushanxiaocao [ 20. Apr 2018, 04:00 ]
Post subject:  Advanced iframe parent page links

Hello
I am new to Wordpress and Advanced Iframe, need to embed an asp.net page into the wordpress in the same domain.
This is my code
[advanced_iframe src= "http://www.abc.com/parent.aspx" width=“100%” height=“50px” use_shortcode_attributes_only="true" onload_resize="true"]
The parent.aspx has one link, <a href = "link1.aspx">link1</a>. Clicking on the link1 goes to link1.aspx page. It works well. However, refreshing the link1.aspx will automatically reload parent.aspx. This is NOT what I want. I want link1.aspx to be reloaded when clicked. Any idea?
Another question is the parent.aspx has an external link <a href = “http://www.XYZ.com">XYZ</a>. Clicking on the XYZ link goes to XYZ page. However the XYX page is still embedded in the parent.aspx with the header of parent.aspx. How to fix it?
Thank you in advance.

Author:  TinyWebGallery [ 22. Apr 2018, 08:55 ]
Post subject:  Re: Advanced iframe parent page links

So you mean that if you click on a link that after a page reload you want to have the last page loaded again?

Like: http://www.tinywebgallery.com/blog/adva ... -to-parent ?

So you like to change the link target:
http://www.tinywebgallery.com/blog/adva ... argets#e10

Best, Michael

Author:  chushanxiaocao [ 23. Apr 2018, 21:16 ]
Post subject:  Re: Advanced iframe parent page links

Thank you Michael.

The first problem was resolved.
The second is not yet. Here is my code, somewhere is wrong?

The following link in http://www.abc.com/parent.aspx

<a href = “http://www.XYZ.com" id="linkXYZ">XYZ</a>

[advanced_iframe src= "http://www.abc.com/parent.aspx" width=“100%” height=“50px” use_shortcode_attributes_only="true" onload_resize="true"
map_parameter_to_url="page" add_iframe_url_as_param="same" change_parent_links_target="a#linkXYZ" change_iframe_links="#iframe-navigation a,form" change_iframe_links_target="_blank"]

The http://www.XYZ.com page is stilled shown in the iframe with URL http://www.abs.com/?page=undefined

Thank you in advance for replying.

(FYI: We bought the pro version including Extend support to 12 months services)

Author:  TinyWebGallery [ 24. Apr 2018, 08:52 ]
Post subject:  Re: Advanced iframe parent page links

The link you want to change is IN the iframe?

change_iframe_links="#iframe-navigation a,form" change_iframe_links_target="_blank"

is the right solution but I think that your selector is different.

change_iframe_links="a" change_iframe_links_target="_blank"

does change ALL links in the iframe to be opened in a new window. If you like that ony spefic links are changed then you have to narrow down the selector. See the jQuery help I have included on the help tab...

Best, Michael

Author:  chushanxiaocao [ 24. Apr 2018, 13:32 ]
Post subject:  Re: Advanced iframe parent page links

Yes, the the link I want to change is IN the iframe.

change_iframe_links="#iframe-navigation a,form" change_iframe_links_target="_blank"
does not work.

change_iframe_links="a" change_iframe_links_target="_blank"
works, but as you said ALL links in the iframe is opened in a new window. (I want some to be opened in the iframe, some to be opened in a new window)

So if the purpose is to open the link in a new window, that can be done by directly adding target = "_blank" to the link <a href = “http://www.XYZ.com" id="linkXYZ">XYZ</a>, right?
Where is the jQuery help? can you post a link?
Thank you!

Author:  TinyWebGallery [ 26. Apr 2018, 08:59 ]
Post subject:  Re: Advanced iframe parent page links

The jQuery help in on the help tab in the administration like I have written before. Also actually all settings where jQuery can be used have a link in the description.

In your case

change_iframe_links="a#linkXYZ" change_iframe_links_target="_blank"

should work.

Best, Michael

Author:  chushanxiaocao [ 26. Apr 2018, 13:28 ]
Post subject:  Re: Advanced iframe parent page links

Thank you very much!

change_iframe_links="a#linkZYX" change_iframe_links_target="_blank"
WORKS!!

So, the following code is for A FORM, not A LINK?
change_iframe_links="#iframe-navigation a,form" change_iframe_links_target="_blank"

Thanks again!

Author:  chushanxiaocao [ 26. Apr 2018, 15:05 ]
Post subject:  Re: Advanced iframe parent page links

the following code
change_parent_links_target="a#link1,a#link2"
is from
http://www.tinywebgallery.com/blog/advanced-iframe/advanced-iframe-pro-demo/change-links-targets

I used it on my website and spent a few days to make it work, but had no luck untill I saw your reply today.
It should be
change_parent_links="a#link1,a#link2"

I am right?

Author:  TinyWebGallery [ 27. Apr 2018, 00:23 ]
Post subject:  Re: Advanced iframe parent page links

No.

on the website in the demo I show 2 features.
Modifying links on the parent page AND
modifying links IN the iframe.

change_parent_links_target="a#link1,a#link2"
is for the parent page! It modifies the links with the id="link1" and id="link2" so that if you click this link they are opened in the iframe!

change_iframe_links="#iframe-navigation a,form" change_iframe_links_target="_blank"
does change all links the div with the id="iframe-navigation" AND all forms to the target _blank.

You simply where using the wrong feature at the beginning.

Just saw that the display of the demo was broken for the 2nd example. The config for that is fixed now.

Best, Michael

Author:  chushanxiaocao [ 27. Apr 2018, 04:05 ]
Post subject:  Re: Advanced iframe parent page links

Thank you for explaining it!
I got it.

Another question is about open PDF files in the iframe.
Firefox works, but Chrome does not work (clicking on the PDF link, nothing happens).
Do you have any idea?
Thanks in advance.

Author:  TinyWebGallery [ 27. Apr 2018, 11:00 ]
Post subject:  Re: Advanced iframe parent page links

you have to check if you maybe get any errors in the browser console.

Best, Michael

Author:  chushanxiaocao [ 2. May 2018, 14:32 ]
Post subject:  Re: Advanced iframe parent page links

Thank you!

Another question:
An asp.net page having a form of more than 2000px height is embedded in the iframe.
To get ride of the vertical scrollbar, I used onload_resize="true". This works well.
But the form has to be validated using ASP.NET, if anything is missing or wrong, the form cannot be submitted.
At this time the form may be reloaded, and the vertical scrollbar come out.
Any ideas?
Thank you in advance

Author:  TinyWebGallery [ 2. May 2018, 14:51 ]
Post subject:  Re: Advanced iframe parent page links

Is there a real reload or is this done by Ajax?

Because for reload the onload_resize="true" is enough.
But if this is an ajax call you should use the "resize on element resize".

See: http://www.tinywebgallery.com/blog/advanced-iframe/advanced-iframe-pro-demo/resize-on-element-resize

Best, Michael

Author:  chushanxiaocao [ 2. May 2018, 15:29 ]
Post subject:  Re: Advanced iframe parent page links

Thank you Michael!
I figured it out.
You are the best!

Author:  TinyWebGallery [ 2. May 2018, 21:35 ]
Post subject:  Re: Advanced iframe parent page links

Glad I could help. Feel free to do a small review on codecanyon or Wordpress.

Best, Michael

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