...

View Full Version : Force iFrame



X-Pr0j3cT
06-17-2008, 07:36 PM
I just cant force my iframe to be shown in on parent page when i open direct links. I have tried everything. I got it to the point when direct link opens in parent page but iFrame is empty.

www.freakcrew.net is the page i wuld like to force iFrame.

If anyone knows how to do it please help me.

Thank you

X-Pr0j3cT

rnd me
06-18-2008, 09:29 AM
change the target attribute of your links to the name attribute of your iframe.

X-Pr0j3cT
06-18-2008, 01:47 PM
Main page:



<script type="text/javascript">

loc="info.html"

var str = location.search;
if(str != ""){
loc=str.substring(1, str.length)
}

function load_frame(){
document.body.style.overflow="hidden"
document.getElementById('iframe1').src=loc
}
</script>

iFrame Page:


<script type="text/javascript">
if (self == top){
var url = self.location;
self.location = "index.html?" + finepix.html;
}
</script>


Now what do i have to change? :)

rnd me
06-18-2008, 06:03 PM
you dont need to change any javascript.

instead of: <a href="mypage">my page</a>
use: <a href="mypage" target="frame1">my page</a>

above considers that your iframe has a name attribute on its tag, set to "frame1"

X-Pr0j3cT
06-18-2008, 07:22 PM
ok it seems we dont understand eachother... what i want is that when someone in google searches something and he gets my iFrame page and clicks on it it opens that page without main page.

Mr J
06-18-2008, 08:36 PM
Try this in the iframe page


<script type="text/javascript">
if (self == top){
var url = self.location;
self.location = "index.html?finepix.html"
}
</script>

and are you running function load_frame() onload?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum