Page 2 of 2
Posted: Thu Mar 31, 2005 12:23 am
by s.dot
infolock wrote:i would recommend you look into using
iFrames
No, my framing works fine. I just need to know how to return the value of the URL in the bottom frame. I don't think it's anything difficult, I am just not to familiar with javascript. I need the URL of top.frames[1].
Posted: Thu Mar 31, 2005 12:38 am
by infolock
sorry, misunderstood you...
Code: Select all
<html>
<head>
<script language="e;javascript"e;>
var MyThing = window.parent.location;
document.write(MyThing);
</script>
</head>
</htmL>
of course instead of just document.write, you could point to a field in your frame, or just write it out on the frame itself...
Posted: Thu Mar 31, 2005 1:08 am
by s.dot
well this link will be in the top frame. It will be a link containing the URL of the bottom frame.
so I'm not sure if window.parent.location would work, because I need the bottom frame..
would
Code: Select all
<a href="e;<script> var MyThing = window.top.framesї1].location; document.write(MyThing); </script>"e; target="e;_blank"e;>
work?
Posted: Thu Mar 31, 2005 3:08 am
by infolock
scrotaye wrote:well this link will be in the top frame. It will be a link containing the URL of the bottom frame.
so I'm not sure if window.parent.location would work, because I need the bottom frame..
would
Code: Select all
<a href="e;<script> var MyThing = window.top.framesї1].location; document.write(MyThing); </script>"e; target="e;_blank"e;>
work?
well, i only used parent.location as an example. what you would want to use is something along the lines of :
Code: Select all
var MyThing = parent.framesї1].location;
then you could do whatever you want with it.. alert with it, write it on the page, etc..
you should really do some homework on javascript. i'm not meaning that in a bad way by any means, just saying it's gonna help you out with this kinda thing. javascript is a very easy language to learn, and when you are gonna be dealing with window manipulation (like i can only assume you are gonna be doing based on this kinda question), knowing a little about javascript is only gonna help

Posted: Thu Mar 31, 2005 11:01 am
by s.dot
using parent.frames[1].location.href I keep getting the URL of my homepage of
http://www.crazyexchange.net . However, the bottom frame is not even hosted on my site/server. However, when I use frames[0] I get the correct frame location of the top frame.
And could you point me towards some good javascript tutorials?