Ok, is it possible so that if i click a link, two things could open in two iframes?
Thanks
Luke
Moved by Agesilaus (Forum Moderator) from Designing & Development: Please post in the correct forum next time.![]()

Ok, is it possible so that if i click a link, two things could open in two iframes?
Thanks
Luke
Moved by Agesilaus (Forum Moderator) from Designing & Development: Please post in the correct forum next time.![]()
Last edited by Agesilaus; 02-01-2008 at 10:44 PM.
How about something like:
<a target="hello" href="hi3.php"><a target="hello2" href="hi.php">Open</a></a>
only 1 opens,
I think you'll need javascript.
like
<a onClick="openboth();">link</a>
& then in js you open both links in their iframes
http://habtown.net/Habtown_Layout_V1/testin.htm
I've set 2 pages, wen u click, only 1 changes![]()
I've just tested out myself i got one working, holdon; il post it:
EDIT: okay, so in my test.html I put this:
And in my test.js (javascript file) I put this:HTML Code:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>Untitled Document</title> <SCRIPT LANGUAGE="JavaScript" SRC="test.js"> </SCRIPT> </head> <body> <a href="#" onclick="openboth();">link</a><br /> <br /> <iframe name="frame1" src="a.html"></iframe> <iframe name="frame2" src="b.html"></iframe> </body> </html>
So you want to open 1.html & 2.html in iframes frame1 & frame2 get me ?Code:function openboth(){ window.frame1.location="1.html"; window.frame2.location="2.html"; }
check, i have my test here:
http://www.2nd-design.com/test
Last edited by [Oli]; 02-01-2008 at 10:18 PM.
I've just tested out myself i got one working, holdon; il post it:
EDIT: okay, so in my test.html I put this:
And in my test.js (javascript file) I put this:HTML Code:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>Untitled Document</title> <SCRIPT LANGUAGE="JavaScript" SRC="test.js"> </SCRIPT> </head> <body> <a href="#" onclick="openboth();">link</a><br /> <br /> <iframe name="frame1" src="a.html"></iframe> <iframe name="frame2" src="b.html"></iframe> </body> </html>
So you want to open 1.html & 2.html in iframes frame1 & frame2 get me ?Code:function openboth(){ window.frame1.location="1.html"; window.frame2.location="2.html"; }
check, i have my test here:
http://www.2nd-design.com/test
ahh, i see, tht's fairly simple
Thanks, i would +rep but spread.
You could have a javascript function to open to a location:
Code:function openlink(url,windowframe) { window.open(url,windowframe); } <a href="#" onclick="openlink('http://google.co.uk','_parent');">Link me</a>
Want to hide these adverts? Register an account for free!