Shoutbox

javascript refer to outside a frame - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Skype & Technology (/forumdisplay.php?fid=9)
+---- Forum: Tech Talk (/forumdisplay.php?fid=17)
+----- Thread: javascript refer to outside a frame (/showthread.php?tid=76335)

javascript refer to outside a frame by Jarrod on 07-26-2007 at 09:25 AM

so I have this

code:
<html>
yatta yatta yatta...

<iframe src ="frontpage.html" width="100%" height="100%" allowtransparency="true" frameborder="0" id="estate"></iframe>



then in frontpage.html(the framed page)
I have
code:
<a href="javascript:" onclick="window.getElementById('estate').src='bio.html'">Bio</a>


where I have window(underlined) I tried document but I know that's not quite right trying to change the content interfame like that so how do I do it?
RE: javascript refer to outside a frame by ShawnZ on 07-26-2007 at 09:27 AM

why not just... href="bio.html"?


RE: javascript refer to outside a frame by Jarrod on 07-26-2007 at 09:30 AM

because i don't want the whole web page to reload when i only need some text in a frame


RE: javascript refer to outside a frame by ShawnZ on 07-26-2007 at 09:30 AM

quote:
Originally posted by xen0h
cecause i don't want the whole web page to reload when i only need some text in a frame

because obviously, links inside of an iframe apply to the external page, thats not a security risk at all 8-)
RE: javascript refer to outside a frame by -dt- on 07-26-2007 at 09:31 AM

stop copying and pasting code and then pasting it again onto the forums to get help :(


RE: RE: javascript refer to outside a frame by Jarrod on 07-26-2007 at 09:55 AM

quote:
Originally posted by -dt-
stop copying and pasting code and then pasting it again onto the forums to get help :(

sorry -dt- i'm just doing a webdesign project and i haven't done much javascript, sorry
RE: javascript refer to outside a frame by ShawnZ on 07-26-2007 at 08:18 PM

quote:
Originally posted by xen0h
sorry -dt- i'm just doing a webdesign project and i haven't done much javascript, sorry

but you didn't even need javascript to do it, just basic html :rofl:
RE: javascript refer to outside a frame by Nathan on 07-26-2007 at 08:27 PM

And (I)frames suck.


RE: javascript refer to outside a frame by Supersonicdarky on 07-26-2007 at 08:30 PM

quote:
Originally posted by Napbree
And (I)frames suck.

RE: javascript refer to outside a frame by Nathan on 07-26-2007 at 08:34 PM

Why are you quoting me?

* Nathan runs


RE: javascript refer to outside a frame by joey on 07-26-2007 at 08:34 PM

because he agrees...?


RE: javascript refer to outside a frame by Nathan on 07-26-2007 at 08:36 PM

and so should everyone...
(I)frames are old skool.


RE: javascript refer to outside a frame by -dt- on 07-27-2007 at 12:35 AM

quote:
Originally posted by Napbree
and so should everyone...
(I)frames are old skool.
better than the crappy "ajax" thing you use on "skoolfun"
RE: javascript refer to outside a frame by Voldemort on 07-27-2007 at 01:26 AM

i love you, dt.


RE: javascript refer to outside a frame by matty on 07-27-2007 at 02:44 AM

code:
<a href="bio.html" target="estate">bio.html</a>

RE: javascript refer to outside a frame by Volv on 07-27-2007 at 05:51 AM

Yes, as Matty pointed out that's what the target field is for =/