rsrwebs Posted August 9, 2009 Report Posted August 9, 2009 Hello again, I've been having a problem with my hyperlinks targeted to iframes that I have never had before. When it's supposed to load the linked page in the iframe, it instead opens the link in a new tab. What's strange is I have been able to get this to work before with no problems at all. I tried even putting the links into the source page that first loads in the iframe, it STILL opens in a new tab. The hyperlinks: Videos | Photos The iframes: All the formatting on these are being done with CSS, this is the code for them: div#subnav { position: relative; margin-left:auto; margin-top:auto; margin-right:auto; text-align:center; } iframe#view { text-align:center; width:600px; height:300px; } iframe#thumbnails { overflow-y:hidden; overflow-x:auto; width:600px; height:100px; } div#gallery { position: relative; margin-left:20%; margin-top:25%; margin-right:auto; text-align:center; } I really appreciate any help given. -Raven
falkencreative Posted August 10, 2009 Report Posted August 10, 2009 I'm on really slow internet access at the moment, so I can't double check this, but I believe you also have to assign each iframe a name: If I remember correctly, you have to set the iframe name in order to target it properly. Just give it the same name as the id. If you haven't replied by the time I get back to proper high speed internet access, I'll double check.
Wickham Posted August 10, 2009 Report Posted August 10, 2009 Yes, although "name" is supposed to be deprecated and replaced by "id", that doesn't apply to iframes which still use "name="...".
rsrwebs Posted August 22, 2009 Author Report Posted August 22, 2009 I'm on really slow internet access at the moment, so I can't double check this, but I believe you also have to assign each iframe a name: If I remember correctly, you have to set the iframe name in order to target it properly. Just give it the same name as the id. If you haven't replied by the time I get back to proper high speed internet access, I'll double check. I have an ID defined for each of them, and the links are targeted to the frame's ID, but the link always opens in a new window.
rsrwebs Posted August 22, 2009 Author Report Posted August 22, 2009 Yes, although "name" is supposed to be deprecated and replaced by "id", that doesn't apply to iframes which still use "name="...". So, what you're saying is I should also define a "name" property?
Wickham Posted August 22, 2009 Report Posted August 22, 2009 Yes, use name=".." The id probably isn't needed unless you are using it for some other function.
rsrwebs Posted September 13, 2009 Author Report Posted September 13, 2009 (edited) Yes, use name=".." The id probably isn't needed unless you are using it for some other function. That was it, I completely didn't notice it because I was focusing on the 'target' property in the links, and not whatever missing property that may have been in the iframe itself. I actually recall now, when I first got a hold of the iframe code, I was confused why there was an id and a name, and now I see why. The 'name' had to be there,and you couldn't just use 'id' alone. Thanks a lot man, it means a lot. Edited September 13, 2009 by rsrwebs
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now