mwproductions
08-20-2004, 10:44 AM
I know, I know, but go with me on this one.
Or don't, actually. It you can think of a better way to do this, I'm all ears.
So here's what I'm trying to do:
On my site, http://www.alifelessordinary.com/, I recently added the option for users to take an RSS feed of my blog. Thing is, the way my site is structured, the blog normally loads inside of a nested frame, but when you visit entries from your aggregator, they don't load inside the frames.
This isn't the worst problem I've ever encountered (and it hasn't yet become the most annoying, though not for lack of trying), but it is one that I'd like to solve.
In doing so, I found the following JavaScript code:
document.write('<frameset cols="50%,*">');
document.write('<frame src="apage.html" name="upperFrame">');
document.write('<frame src="' + (location.search ? location.search.substring(1):'bpage.html') + '" name="lowerFrame">');
document.write('</frameset>');
Which I then modified to work with my nested frame (I was planning on working from the inside out).
The current code for the nested frame is:
<FRAMESET COLS="180,*" FRAMEBORDER="NO" BORDER="10" FRAMESPACING="0">
<FRAMESET ROWS="130,*" FRAMEBORDER="NO" BORDER="0" FRAMESPACING="0">
<FRAME NAME="calFrame" SCROLLING="NO" noresize SRC="allo.blog.cal.htm">
<FRAME NAME="navFrame" SCROLLING="AUTO" noresize SRC="allo.blog.nav.htm">
</FRAMESET>
<FRAME NAME="viewFrame" SCROLLING="AUTO" noresize SRC="allo.blog.view.htm">
</FRAMESET>
So I changed the JavaScript code I found to read:
document.write('<FRAMESET COLS="180,*" FRAMEBORDER="NO" BORDER="10" FRAMESPACING="0">');
document.write('<FRAMESET ROWS="130,*" FRAMEBORDER="NO" BORDER="0" FRAMESPACING="0">');
document.write(' <FRAME NAME="calFrame" SCROLLING="NO" noresize SRC="allo.blog.cal.htm">');
document.write(' <FRAME NAME="navFrame" SCROLLING="AUTO" noresize SRC="allo.blog.nav.htm">');
document.write('</FRAMESET>');
document.write(' <FRAME NAME="viewFrame" SCROLLING="AUTO" noresize SRC="' + (location.search ? location.search.substring(1):'allo.blog.view.htm') + '>');
document.write('</FRAMESET>');
Perhaps it's just because I'm using IE (I read on a page somewhere that this is a Netscape thing), but it wouldn't work properly and I have no idea why. The cal and nav pages loaded properly, but the view page wouldn't load at all. See the results here (http://www.alifelessordinary.com/mt/frametest.htm).
I know the slightest bit of PHP and am working to learn more and this seems like the kind of thing that might be a good project for me (after all, isn't the best way to learn by doing?).
So, bearing in mind that I'll have to sort out how to ensure that the nested frame then loads inside the main frame (as seen on the index page of my site), any ideas?
Much thanks in advance...
Or don't, actually. It you can think of a better way to do this, I'm all ears.
So here's what I'm trying to do:
On my site, http://www.alifelessordinary.com/, I recently added the option for users to take an RSS feed of my blog. Thing is, the way my site is structured, the blog normally loads inside of a nested frame, but when you visit entries from your aggregator, they don't load inside the frames.
This isn't the worst problem I've ever encountered (and it hasn't yet become the most annoying, though not for lack of trying), but it is one that I'd like to solve.
In doing so, I found the following JavaScript code:
document.write('<frameset cols="50%,*">');
document.write('<frame src="apage.html" name="upperFrame">');
document.write('<frame src="' + (location.search ? location.search.substring(1):'bpage.html') + '" name="lowerFrame">');
document.write('</frameset>');
Which I then modified to work with my nested frame (I was planning on working from the inside out).
The current code for the nested frame is:
<FRAMESET COLS="180,*" FRAMEBORDER="NO" BORDER="10" FRAMESPACING="0">
<FRAMESET ROWS="130,*" FRAMEBORDER="NO" BORDER="0" FRAMESPACING="0">
<FRAME NAME="calFrame" SCROLLING="NO" noresize SRC="allo.blog.cal.htm">
<FRAME NAME="navFrame" SCROLLING="AUTO" noresize SRC="allo.blog.nav.htm">
</FRAMESET>
<FRAME NAME="viewFrame" SCROLLING="AUTO" noresize SRC="allo.blog.view.htm">
</FRAMESET>
So I changed the JavaScript code I found to read:
document.write('<FRAMESET COLS="180,*" FRAMEBORDER="NO" BORDER="10" FRAMESPACING="0">');
document.write('<FRAMESET ROWS="130,*" FRAMEBORDER="NO" BORDER="0" FRAMESPACING="0">');
document.write(' <FRAME NAME="calFrame" SCROLLING="NO" noresize SRC="allo.blog.cal.htm">');
document.write(' <FRAME NAME="navFrame" SCROLLING="AUTO" noresize SRC="allo.blog.nav.htm">');
document.write('</FRAMESET>');
document.write(' <FRAME NAME="viewFrame" SCROLLING="AUTO" noresize SRC="' + (location.search ? location.search.substring(1):'allo.blog.view.htm') + '>');
document.write('</FRAMESET>');
Perhaps it's just because I'm using IE (I read on a page somewhere that this is a Netscape thing), but it wouldn't work properly and I have no idea why. The cal and nav pages loaded properly, but the view page wouldn't load at all. See the results here (http://www.alifelessordinary.com/mt/frametest.htm).
I know the slightest bit of PHP and am working to learn more and this seems like the kind of thing that might be a good project for me (after all, isn't the best way to learn by doing?).
So, bearing in mind that I'll have to sort out how to ensure that the nested frame then loads inside the main frame (as seen on the index page of my site), any ideas?
Much thanks in advance...