Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-15-2009, 02:00 AM   PM User | #1
xskybirdx
New to the CF scene

 
Join Date: Aug 2009
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
xskybirdx is an unknown quantity at this point
Text that activates two different links??

I have a page which has two separate iframes. I know how to use target="iframename", but i want to have one link that changes both frames, and the code
Code:
<a href="lalala1.html" target="iframe1"><a href="lalala2.html" target="iframe2">link text</a></a>
doesn't work. Is there any way to do this, or is it a lost cause? Is there maybe a way to use a javascript function? (If javascvript is solution, sorry that this is in wrong topic.)

Last edited by xskybirdx; 08-15-2009 at 10:49 PM.. Reason: Fixing Typo in Code
xskybirdx is offline   Reply With Quote
Old 08-15-2009, 02:35 AM   PM User | #2
Kristofa
Regular Coder

 
Kristofa's Avatar
 
Join Date: Jun 2009
Location: Leicester
Posts: 143
Thanks: 7
Thanked 20 Times in 20 Posts
Kristofa is an unknown quantity at this point
I'm not sure if it would work anyway, but there is a typo in what you posted above. Is that exactly what you tried to use?

Code:
<a href="lalala1.html" target="iframe1"><a href="lalala2" target="iframe2">link text</a></a>
If not, javascript would work.
__________________
Learning along the way...
Kristofa is offline   Reply With Quote
Old 08-15-2009, 08:14 AM   PM User | #3
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,293
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
What you have will not work. You would need to use javascript, at least for the second link.
Code:
<a href="lalala1.html" target="iframe1" onclick="window.frames['iframe2'].location = 'lalala2.html'">link text</a>
__________________
||||If you are getting paid to do a job, don't ask for help on it!||||
_Aerospace_Eng_ is offline   Reply With Quote
Users who have thanked _Aerospace_Eng_ for this post:
xskybirdx (08-15-2009)
Old 08-15-2009, 03:58 PM   PM User | #4
xskybirdx
New to the CF scene

 
Join Date: Aug 2009
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
xskybirdx is an unknown quantity at this point
Quote:
Originally Posted by Kristofa View Post
I'm not sure if it would work anyway, but there is a typo in what you posted above. Is that exactly what you tried to use?

Code:
<a href="lalala1.html" target="iframe1"><a href="lalala2" target="iframe2">link text</a></a>
If not, javascript would work.
Oh, oops . But, no, I checked and the what I tried to use was 'correct', but the text only linked to the second, inner target (lalala2 in example).
xskybirdx is offline   Reply With Quote
Old 08-15-2009, 04:01 PM   PM User | #5
xskybirdx
New to the CF scene

 
Join Date: Aug 2009
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
xskybirdx is an unknown quantity at this point
Quote:
Originally Posted by _Aerospace_Eng_ View Post
What you have will not work. You would need to use javascript, at least for the second link.
Code:
<a href="lalala1.html" target="iframe1" onclick="window.frames['iframe2'].location = 'lalala2.html'">link text</a>
Thank you so much!
xskybirdx is offline   Reply With Quote
Reply

Bookmarks

Tags
anchor tag, href, iframe, link, target

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:25 PM.


Advertisement
Log in to turn off these ads.