...

View Full Version : Load into a Iframe then onLoad into a Iframe?



SpamyDan
07-03-2002, 03:33 PM
hello need a hand loading a page into a differant iframe using onLoad:

I have two Iframes on a page and some links, the first iframe is called 'Main' the other called 'arrow', what i am trying to do is when i click a link which loads up content in the main iframe once that page is loaded it loads up content into the other iframe i.e.'arrow'

ive been tying it with this:

<script language="JavaScript">
<!--
function MM_goToURL() { //v3.0
var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
//-->
</script>

onLoad="MM_goToURL('parent','file: blank.htm');return document.MM_returnValue">

OR - could is it possiable to load two seperate pages into two seperate iFrames using one link ?!?

but of coase this just loads it into the current iframe.
Yes its macromedia, (god help me).

SpamyDan
07-04-2002, 09:46 AM
Managed to work out how two do two frames at once - incase anybody needs to know:

<script>
function Click(){
document.Main.location.href = "http://www.codingforums.com"
document.Arrow.location.href = "http://www.yahoo.com"
}
</script>

<a href="javascript:Click()">Click Here</a>

Just need to work out onLoad now!
;)

ACJavascript
07-05-2002, 05:14 AM
heres what you can do.

In the actual link on the page, put this

<script language="javascript">

function link(){

parent.Main.location.href="whatver.html"

}
</script>


-------

Now in the page - whatver.html - put an onload function like this

<script language="javascript">

function link2(){

parent.arrow.location.href="whatver2.html"

}
</script>

<body onload="link2()">

-------

This should work hehe (Never does though):D:D:D



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum