Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum https://www.tinywebgallery.com/forum/ |
|
Open Button in iFrame to New Tab https://www.tinywebgallery.com/forum/viewtopic.php?f=21&t=3918 |
Page 1 of 1 |
Author: | scooter [ 12. Aug 2015, 05:50 ] |
Post subject: | Open Button in iFrame to New Tab |
Hi, I bought and using your Pro Version. I have a page inside the iframe that is for a Paypal button. I want the button to open in a new tab to show the Paypal checkout page. Right now it opens in the same window when clicked and gets blocked, showing a blank screen. The button code is ---> <button class="btn btn-lg btn-info btn-block" type="submit"> <i class="fa fa-paypal"></i>Pay with PayPal</button> What code do I need to add and where do I add the code to make the button open the page in a new tab instead of inside the iframe? Thanks |
Author: | TinyWebGallery [ 12. Aug 2015, 23:55 ] |
Post subject: | Re: Open Button in iFrame to New Tab |
Do you have access to the button code? Same domain or you can use the external workaround? target="_blank" has to be added. For the 2 setups above the plugin can do this dynamically. Best, Michael |
Author: | scooter [ 14. Aug 2015, 11:31 ] |
Post subject: | Re: Open Button in iFrame to New Tab |
I don't have access to the button code. I'm iframing an app page. I have access to enter header, body, and footer scripts. I tried to put target blank there, but doesn't work. Where in the External Workaround would I put target="_blank"? Thanks |
Author: | TinyWebGallery [ 14. Aug 2015, 11:55 ] |
Post subject: | Re: Open Button in iFrame to New Tab |
So you can include a script to the footer of the external page? Than you can use the external workaround like shown in the demo here: http://www.tinywebgallery.com/blog/advanced-iframe/advanced-iframe-pro-demo/change-links-targets#e11 You have to change var change_iframe_links = "#iframe-navigation a"; to the id of the form. Best, Michael |
Author: | scooter [ 14. Aug 2015, 12:15 ] |
Post subject: | Re: Open Button in iFrame to New Tab |
Yes, I can add header, body and footer scripts to the external page. The form code is this ---->>> <form class="checkout" novalidate="" method="post"> The paypal button code is this --->>> <button class="btn btn-lg btn-info btn-block" type="submit"> <i class="fa fa-paypal"></i>Pay with PayPal</button> You say to change var change_iframe_links = "#iframe-navigation a"; to the id of the form. Are you talking about using this code? --> <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> How would the code look then with the form and button code I provided above? Thanks |
Author: | TinyWebGallery [ 14. Aug 2015, 13:51 ] |
Post subject: | Re: Open Button in iFrame to New Tab |
All settings are stored in ai_external.js so at the administration you have to fill change_iframe_links with .checkout and change_iframe_links_target with _blank Best, Michael |
Author: | scooter [ 14. Aug 2015, 14:36 ] |
Post subject: | Re: Open Button in iFrame to New Tab |
Okay I'm getting close to understanding how to use the work around. In the plugin's "External Workaround" tab I see this.... "change_iframe_links - See Change iframe links" "change_iframe_links_target - See Change iframe links target" FYI.... When I click on those links, they don't work. But I think I understand that I need to just add this to the js settings... change_iframe_links => .checkout change_iframe_links_target => _blank |
Author: | scooter [ 14. Aug 2015, 19:29 ] |
Post subject: | Re: Open Button in iFrame to New Tab |
Okay. It's now working. Whew! I added this to the footer script of the external page and it opens the button in a new tab... <script> var change_iframe_links = ".checkout"; var change_iframe_links_target = "_blank"; </script> <script src="https://mydomain.com/wp-content/plugins/advanced-iframe/js/ai_external.js"></script> Thanks for the help Michael! ================================ I do have another problem though. I'm iframing an https:// page inside an https:// page. I keep getting this error message .... "Http iframes are not shown in https pages in many major browsers. Please read this post for details." If I use your free plugin, I don't get that error message. What is the fix for this? Thanks for the help. |
Author: | TinyWebGallery [ 14. Aug 2015, 23:48 ] |
Post subject: | Re: Open Button in iFrame to New Tab |
I will fix this today! Search for this error message in advanced-iframe.php and remove it until the update. Best, Michael |
Author: | TinyWebGallery [ 15. Aug 2015, 00:15 ] |
Post subject: | Re: Open Button in iFrame to New Tab |
Fix is submitted to codecanyon. I you need the fix right away look for the error message in advanced-iframe.php and simply remove it or contact me to get the fixed version. Best, Michael |
Author: | scooter [ 15. Aug 2015, 00:27 ] |
Post subject: | Re: Open Button in iFrame to New Tab |
I commented it out... /*// show a warning if https pages are shown in http pages. $parent_http = site_url(); if ($this->ai_startsWith(strtolower($src), "http") && $this->ai_startsWith(strtolower($parent_http), "https")) { $html .= 'Http iframes are not shown in https pages in many major browsers. Please read <a href="http://www.tinywebgallery.com/blog/iframe-do-not-mix-http-and-https" target="_blank">this post</a> for details.'; } */ Thanks |
Author: | TinyWebGallery [ 15. Aug 2015, 01:26 ] |
Post subject: | Re: Open Button in iFrame to New Tab |
The fix is approved on codecanyon also. . |
Page 1 of 1 | All times are UTC + 1 hour [ DST ] |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |