...

View Full Version : load 2 iframe with urls from link function



deathmill
07-13-2004, 02:39 PM
Hi,

Trying to get my head around this, hopefully someone can help...

List of links along the top of the page.

<a href="javascript:p1();">Page 1</a> | <a href="javascript:p2();">page 2</a> | <a href="javascript:p3();">page 3</a>

under these are 2 iframes

When I click on 'Page 1' I want to load urls into the iframes.
If I click 'page 2' those too would then load.

Any one seen anything like this?

Cheers,

Death = $Mill

jamescover
07-13-2004, 04:58 PM
<a href="javascript1();">Page 1</a>


What javascript???


<a href="http://www.yourDomain.com/yourPage.html" target="iframeName">Page 1</a>


-james

Basscyst
07-13-2004, 05:15 PM
Or are you trying to load two URL's at once?.



<html>
<head>
<script>

function changeFrames(url1,url2)
{
window.frames[0].location.href=url1;
window.frames[1].location.href=url2;
}
</script>
</head>
<body>
<a href="#" onclick='changeFrames("http://www.google.com","http://www.codingforums.com")'>Go--></a>
<iframe></iframe>
<iframe></iframe>
</body>
</html>


Basscyst

glenngv
07-14-2004, 11:54 AM
Or:

<a href="page1a.htm" target="nameOfTargetIFrame1" onclick="window.open('page1b.htm','nameOfTargetIFrame2')">page 1</a>
<a href="page2a.htm" target="nameOfTargetIFrame1" onclick="window.open('page2b.htm','nameOfTargetIFrame2')">page 2</a>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum