Community Forums › Forums › Archived Forums › Design Tips and Tricks › Controlling IFrame when source page has clickable links
Tagged: iframe
- This topic has 3 replies, 2 voices, and was last updated 9 years, 5 months ago by
Victor Font.
-
AuthorPosts
-
August 20, 2015 at 9:53 pm #163054
ItsJustMe
MemberNever having worked with IFrames until two weeks ago, I'm having a difficult time wrapping my head around the issues of this IFrame to know how to best deal with it.
I've been trying to use the Advanced IFrame Pro plugin to get this set up, but the source page links are throwing me a curve; I'd like to have them open in a fresh tab or something, but am not 100% certain it can be done. If not, then I need some help thinking outside the box for the most ideal options.Here's a link to the source page.
http://www.skashi.com/proddet.asp?category=Engagement+RingsThe good part is that the dimensions remain constant, allowing me to use the plugin settings to hide the top menu as well as the phone number and other contact information at the bottom. Even when you click on a ring, the framework remains steady. Where it becomes a problem is when a person clicks on the zoom.
So, I guess I need to see if there's a way to have any click open the view in a new tab, which may mean needing to abandon use of the plugin.
At this point, my brain hurts. Can anyone help?
August 21, 2015 at 7:17 am #163077Victor Font
ModeratorAn iframe or inline frame by definition is used to embed an HTML page in another HTML page. Everything in an iframe happens within the context of the parent page. This is called nested browsing. If you want to open up a page in another window or tab, you have to include target="_blank" in your anchor link. This will not work in an iframe. However, using the advanced iframe plugin, you should be able to use jQuery to adjust a link target:
jQuery('iframe a').attr('target', '_blank');
If you add the above jQuery code to the page header in a script wrapper, it whould get you started. You may have to change the iframe a text to match your CSS descriptors.
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?August 22, 2015 at 3:02 pm #163195ItsJustMe
MemberThanks, Victor, for the additional information and insight. Am I correct in my read of the latter portion that that jQuery code would be for the parent page page header?
The developer/author of the plugin left me with the impression that what I was trying to accomplish would require access to the source page, which I don't have. Thankfully it turns out the primary vendor for which I was needing the IFrame has their setup in such a way that it eliminates the primary challenge. (Thank goodness for businesses that actually make it easier to do business with them. 🙂 )
I'm not sure that I'm going to get so lucky with some of the other vendors, so your guidance on this could prove to come in handy.....August 22, 2015 at 3:13 pm #163196Victor Font
ModeratorYes Holly, that jQuery goes on the parent page.
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet? -
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.