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 22. Oct 2017, 21:17

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 14 posts ] 
Author Message
 Post subject: link in new windows
PostPosted: 5. May 2016, 17:57 
Offline

Joined: 8. Jan 2015, 17:02
Posts: 13
Hi there
I am having some trouble getting my links to open in new windows.

I have an iframe on this page http://pictonhh.pecon.ca/hh-search/ if you type hammer in the search box it will display the results, i would like all links from the results page to open in new windows please.

my code is
[advanced_iframe securitykey="6f88488e5cdfdbd92899b4e4d3ffccaace4ca25a" src="http://www.homehardware.ca/en/index.htm" use_shortcode_attributes_only="true" id="example3" height="3050" width="100%" scrolling="no" show_part_of_iframe="true" show_part_of_iframe_x="210" show_part_of_iframe_y="182" show_part_of_iframe_width="541" show_part_of_iframe_height="37" show_part_of_iframe_next_viewports="230,290,1200,3050" show_part_of_iframe_next_viewports_loop="false" enable_lazy_load="true" enable_lazy_load_threshold="200" enable_lazy_load_fadetime="5000" change_iframe_links="#mainContent a" change_iframe_links_target="_blank"]

i have also tried
change_iframe_links=".mainContent a" change_iframe_links_target="_blank"
change_iframe_links="#results.grid a" change_iframe_links_target="_blank"
change_iframe_links=".results.grid a" change_iframe_links_target="_blank"

but i still cannot get the links to open in a new window. Any assistance will be appreciated

thank you


Top
 Profile  
 
 Post subject: Re: link in new windows
PostPosted: 6. May 2016, 08:42 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 10498
You can only change link targets on a remote domain if you can use the external workaround.

Please see: http://www.tinywebgallery.com/blog/advanced-iframe/advanced-iframe-pro-demo/change-links-targets

Best, Michael


Top
 Profile  
 
 Post subject: Re: link in new windows
PostPosted: 6. May 2016, 12:23 
Offline

Joined: 8. Jan 2015, 17:02
Posts: 13
Hi can you give me little more of an idea with the code please.

<script>
var iframe_redirect_url = "http://www.tinywebgallery.com/blog/advanced-iframe/advanced-iframe-pro-demo";
var change_iframe_links = "#iframe-navigation a";
var change_iframe_links_target = "_blank";
</script>
<script src=”http://www.tinywebgallery.com/blog/wp-content/plugins/advanced-iframe/js/ai_external.js”></script>

And the shortcode which is used is:
[advanced_iframe securitykey="your key" use_shortcode_attributes_only="true" src="http://examples.tinywebgallery.com/example11/example.html" id="advanced_iframe" height="1000" width="900" show_part_of_iframe="true" show_part_of_iframe_x="22" show_part_of_iframe_y="85" show_part_of_iframe_width="187" show_part_of_iframe_height="121" show_part_of_iframe_style="border: 2px solid #ff0000;"]

i can see what is happening in the scrip but the code doesnt reflect this.

could you please let me konw the actual code that i need to add to my page.

thanks


Top
 Profile  
 
 Post subject: Re: link in new windows
PostPosted: 6. May 2016, 13:09 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 10498
I don't understand what you mean "the code does not reflect this".

Basic question is: Can you add the one line of Javascript to "http://www.homehardware.ca/en/index.htm" ??
<script src=”<your domain>/wp-content/plugins/advanced-iframe/js/ai_external.js”></script>

As I have written before:
"You can only change link targets on a remote domain if you can use the external workaround."

Otherwise it would be possible to change any website you like without having access to it!

Best, Michael


Top
 Profile  
 
 Post subject: Re: link in new windows
PostPosted: 6. May 2016, 14:03 
Offline

Joined: 8. Jan 2015, 17:02
Posts: 13
hi michael

i really do not know what you are telling me.

You know what i am trying to achieve here, can it be done yes or no?

If yes, can you just please tell me what i need to do in order to do it as i cannot go any further. I have read the link that you sent me and i do not understand it.

thank you


Top
 Profile  
 
 Post subject: Re: link in new windows
PostPosted: 6. May 2016, 14:07 
Offline

Joined: 8. Jan 2015, 17:02
Posts: 13
ok how about another idea then

from my initial search box here http://pictonhh.pecon.ca/hh-search/

is it possible to display the results in a new window showing the original site ( http://www.homehardware.ca/en/index.htm )

thanks


Top
 Profile  
 
 Post subject: Re: link in new windows
PostPosted: 6. May 2016, 14:21 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 10498
You still have not told tell me if you have access to the other site.

Yes or no?

If not then changing link targets is NOT possible. No one can as this is restricted by the browser.

You can still show the results on your page - but links are than opened inside your iframe.

You can show the results in a new tab if you add target="_blank" to your form.


Best, Michael


Top
 Profile  
 
 Post subject: Re: link in new windows
PostPosted: 6. May 2016, 15:02 
Offline

Joined: 8. Jan 2015, 17:02
Posts: 13
sorry, no i do not have access to the other site and i understand what you are telling me.

You can show the results in a new tab if you add target="_blank" to your form.

this will hopefully work, so can you please show me what i put this in the iframe code

[advanced_iframe securitykey="your key" use_shortcode_attributes_only="true" src="http://examples.tinywebgallery.com/example11/example.html" id="advanced_iframe" height="1000" width="900" show_part_of_iframe="true" show_part_of_iframe_x="22" show_part_of_iframe_y="85" show_part_of_iframe_width="187" show_part_of_iframe_height="121" show_part_of_iframe_style="border: 2px solid #ff0000;"]

thank you


Top
 Profile  
 
 Post subject: Re: link in new windows
PostPosted: 6. May 2016, 15:21 
Offline

Joined: 8. Jan 2015, 17:02
Posts: 13
sorry this is my code

[advanced_iframe securitykey="6f88488e5cdfdbd92899b4e4d3ffccaace4ca25a" src="http://www.homehardware.ca/en/index.htm" use_shortcode_attributes_only="true" id="example3" height="3050" width="100%" scrolling="no" show_part_of_iframe="true" show_part_of_iframe_x="210" show_part_of_iframe_y="182" show_part_of_iframe_width="541" show_part_of_iframe_height="37" show_part_of_iframe_next_viewports="230,290,1200,3050" show_part_of_iframe_next_viewports_loop="false" enable_lazy_load="true" enable_lazy_load_threshold="200" enable_lazy_load_fadetime="5000" change_iframe_links="#mainContent a" change_iframe_links_target="_blank"]

so where do i need to add target="_blank" in order to make the results open in a new tab

thanks


Top
 Profile  
 
 Post subject: Re: link in new windows
PostPosted: 6. May 2016, 15:43 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 10498
You cannot change the link target of the search from homehardware. This is not possible!

e.g. http://www.homehardware.ca/en/cat/search/_/N-2pqfZ67l/Ne-67n/Ntk-All_EN?Ntt=hello
searches for hello. So you need to implement your own form with a target=_blank and use Ntt for your search box.
But I don't know where N-2pqfZ67l/Ne-67n/Ntk-All_EN does come from. This can be dynamic also to avoid, that people copy the search ;).

<form id="searchbox" action="http://www.homehardware.ca/en/cat/search/_/N-2pqfZ67l/Ne-67n/Ntk-All_EN" method="get" target="_blank">
<input id="Ntt" type="text" placeholder="Type here">
<input id="submit" type="submit" value="Search">
</form>

See: http://www.w3schools.com/html/html_forms.asp

What you have done so far that you change the viewport after the search is already a good idea. You maybe optimize this. But currently there is not option that you can enable the scrolling for the next viewport. I have added this as a feature for version 8.


Top
 Profile  
 
 Post subject: Re: link in new windows
PostPosted: 6. May 2016, 16:20 
Offline

Joined: 8. Jan 2015, 17:02
Posts: 13
i dont understand the form..

where do i put this and what does it need to be called? how does the shortcode work with the form?


Top
 Profile  
 
 Post subject: Re: link in new windows
PostPosted: 6. May 2016, 23:33 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 10498
You have 2 ways to solve this.

Use you own form -> this has nothing todo with an iframe anymore!

If use an iframe with a different viewport like you have with your shortcode already.
But as you cannot enable scrollbars on a viewport change if the first one has it disabled
you have to make the viewport really big.

Best, Michael


Top
 Profile  
 
 Post subject: Re: link in new windows
PostPosted: 6. May 2016, 23:42 
Offline

Joined: 8. Jan 2015, 17:02
Posts: 13
so basically iframe pro cannot do what i want it to do?

display the search box in an ifrae but open the results on the main site in a new window?


Top
 Profile  
 
 Post subject: Re: link in new windows
PostPosted: 7. May 2016, 00:27 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 10498
Not in your setup as you don't have access to the other page.
But it is simply not possible because of browser restrictions.

Best, Michael


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

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 2 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:
Powered by phpBB® Forum Software © phpBB Group

phpBB SEO