onload target iframe
- Started
- Last post
- 13 Responses
- xrusos
i'm trying to get an html doc within an iframe to use the onload function to auto load another iframe on the page... how do i get the onload to target another iframe?
- clone0
your ireames should be named just set the target the the iframe name you designate
HOME
can u figure it from there
- xrusos0
this is what i got... doesn't work yet...
articles
Article 1
- xrusos0
of course, no code for pv-an
- xrusos0
(html)
(head)(title)articles(/title)
(script language="JavaScript")
(!--
ÊÊÊfunction loadtwo(page2, page3) {
ÊÊÊÊÊparent.content.location.hre...
ÊÊÊÊÊparent.third_nav.location.h...
}
// --)
(/script)
(/head)
(body)
(a href="#top" onClick="loadtwo('article_1.htm... 1(/a)
- kodap0
[a href="url" target="framename"]
- xrusos0
thanks kodap, i tried changing #top to url but no dice...
i'll work at it tomorrow.
anyone else?
- gabe0
onLoad="window.location.href('wh...
in your body tag should work. change "location" to the name of your iframe.
- clone0
go to
http://justin.pixeltwins.com/_co…
view the source there it uses iframe targeting from one frame to the next
- gabe0
i mean change "window" to the name of the iframe you want to target, not "location"
i.e. if the name of your iframe was newsframe, then it would look like this:
onLoad="window.newsframe.locatio...
- schjetne0
And if you want to load content in two different iframes, it would probably look something like this:
onLoad="window.newsframe.
location.href('whatever.h
tml'); window.otherframe.
location.href('whatever2.h
tml');"
- xrusos0
i got it working but then threw one last wrench into the system...
http://www.phillipagreenberg.com…
the dns url fwd's it to my server where it is placed under a subdirectory... i set it up to utilize frames so that no one sees that it is really on my server. (so it always says "http://www.phillipagreenberg.co... in the address bar)
anyway, now the href="#top" doesn't work (because it's in another frame)... what's the quick fix here?
- xrusos0
www.phillipagreenberg.com...
doesn't worksmall-fish.com/phillipagr...
works fine
- xrusos0
oops...
http://www.phillipagreenberg.com…
doesn't workhttp://www.small-fish.com/philli…
works fine