Alright, this is kind of a long one, but I've included some troubleshooting of my own that will hopefully help anyone wanting to takcle this problem.
Here's the deal: I've got a website index page (index.html) that is split up into 3 frames:
name: Frames (name given to the index page when it loads)
I've also got a popup window that the HOME page creates in the onLoad event handler called UPDATES. Here's the problem: I'm trying to change the documents of two different pages, HOME and TITLE, w/ one hyperlink located in UPDATES. I've had no problems being able to change either HOME or TITLE via a link within UPDATES as long as I set "HOME" or "TITLE" as the target for the hyperlink. However, whenever I try setting the target to, we'll say, TITLE, then try using the onClick event to change the HOME page, it gives me an error. Below are some examples of variations I've tried and the errors it gave me:
EXAMPLE 1:
ERROR:
'Home' is undefined
EXAMPLE 2:
ERROR:
no error; however, it loads the 'ByLocation.html' in the UPDATES window for some reason ("parent" isn't the same thing as "self" is it?
)
EXAMPLE 3:
ERROR:
no error; again, it loads the 'ByLocation.html' in UPDATES
EXAMPLE 4:
ERROR:
'Frames' is undefined
In all the above examples, the page was sent to the TITLE page fine. Also worth noting, I've got a link within the HOME page itself that does the same thing I'm trying to do from the UPDATES page, only it works
The code for that looks like this:
For some reason, when the hyperlink is located within the frames themselves, it has no problem resolving the code within the onClick event. *scratches head*
If anyone could give me some advice on this problem, I'd greatly appreciate it. Thanks in advance!!
Here's the deal: I've got a website index page (index.html) that is split up into 3 frames:
name: Frames (name given to the index page when it loads)
Code:
<frameset rows="110px,*" frameborder="0" border="0">
<frame src="HomePageTitle.html" scrolling="no" name="Title">
<frameset cols="20%,*" frameborder="0" border="0">
<frame src="LeftMargin.html" scrolling="no">
<frame src="HomeMenu.html" scrolling="yes" name="Home">
</frameset>
<noframes> If you see this message, then your browser doesn't support frames, which are required to
view this page.
</noframes>
</frameset>
I've also got a popup window that the HOME page creates in the onLoad event handler called UPDATES. Here's the problem: I'm trying to change the documents of two different pages, HOME and TITLE, w/ one hyperlink located in UPDATES. I've had no problems being able to change either HOME or TITLE via a link within UPDATES as long as I set "HOME" or "TITLE" as the target for the hyperlink. However, whenever I try setting the target to, we'll say, TITLE, then try using the onClick event to change the HOME page, it gives me an error. Below are some examples of variations I've tried and the errors it gave me:
EXAMPLE 1:
Code:
<a href="BandPicsTitle.html" target="Title" onClick="Home.location.href='ByLocation.html'; return true;">pics and movies</a>
ERROR:
'Home' is undefined
EXAMPLE 2:
Code:
<a href="BandPicsTitle.html" target="Title" onClick="parent.location.href='ByLocation.html';
return true;">pics and movies</a>
ERROR:
no error; however, it loads the 'ByLocation.html' in the UPDATES window for some reason ("parent" isn't the same thing as "self" is it?
![[ponder] [ponder] [ponder]](/data/assets/smilies/ponder.gif)
EXAMPLE 3:
Code:
<a href="BandPicsTitle.html" target="Title" onClick="parent.parent.location.href='ByLocation.html'; return true;">pics and movies</a>
ERROR:
no error; again, it loads the 'ByLocation.html' in UPDATES
EXAMPLE 4:
Code:
<a href="BandPicsTitle.html" target="Title" onClick="Frames.Home.location.href='ByLocation.html'; return true;">pics and movies</a>
ERROR:
'Frames' is undefined
In all the above examples, the page was sent to the TITLE page fine. Also worth noting, I've got a link within the HOME page itself that does the same thing I'm trying to do from the UPDATES page, only it works
Code:
<a href="BandPicsTitle.html" target="Title" onClick="parent.Home.location.href='ByLocation.html'; return true;">pics and movies</a>
For some reason, when the hyperlink is located within the frames themselves, it has no problem resolving the code within the onClick event. *scratches head*
If anyone could give me some advice on this problem, I'd greatly appreciate it. Thanks in advance!!