|
|
|
|
![]() ![]() |
Feb 9 2007, 05:30 AM
Post
#1
|
|
|
Super Member Group: [HOSTED] Posts: 521 Joined: 25-April 05 Member No.: 4,374 |
I have known this for a long time but I have a problem on my site and I need suggestions on how to fix it. My site (ycoderscookbook.com) uses frames. There are five frames to be exact, four on each side and the center one holds the content. I may just be a baby here but I really like the design and I hope not to change it.
Here is the problem, I have a JavaScript that places a page in the proper frames if navigated to by itself. There appears to be a flaw in the design because it goes to the main page if this happens. Even if say code.html is loaded, it always ends up at main.html. CODE if(top == self){ top.location.href = 'index.html'; } The bottom line is I don’t care for JavaScript, I think it is the poorest excuse for a programming language ever. Can someone have mercy on me and post an example which will load the current requested page in the correct frame? |
|
|
|
Feb 9 2007, 01:25 PM
Post
#2
|
|
|
Living at the Datacenter Group: [HOSTED] Posts: 696 Joined: 30-June 06 From: Australia Member No.: 14,219 |
when making your frameset page (the index page that people goto to see all the frames on one page) you need to add ID's so that you can ID each frame
CODE <frameset rows="*,80" frameborder="no" border="0" framespacing="0"> <frame src="file:///C|/Program Files/Macromedia/Dreamweaver 8/Untitled-1" name="mainFrame" id="mainFrame" title="mainFrame" /> <frame src="file:///C|/Program Files/Macromedia/Dreamweaver 8/UntitledFrame-2" name="bottomFrame" scrolling="No" noresize="noresize" id="bottomFrame" title="bottomFrame" /> i have named the mainFrame and bottomFrame in this example so the too snippets of code you are adding are CODE id="mainFrame" and CODE id="bottomFrame" then when you go to make your hyperlinks, make sure you add a target (the same as your ID before) CODE <a href="http://www.google.com" target="bottomFrame">Link to Frame </a> good luck -jimmy This post has been edited by Jimmy89: Feb 9 2007, 01:28 PM |
|
|
|
Feb 11 2007, 03:47 AM
Post
#3
|
|
|
Super Member Group: [HOSTED] Posts: 744 Joined: 8-April 06 From: Lima - Peru Member No.: 12,579 |
when making your frameset page (the index page that people goto to see all the frames on one page) you need to add ID's so that you can ID each frame CODE <frameset rows="*,80" frameborder="no" border="0" framespacing="0"> <frame src="file:///C|/Program Files/Macromedia/Dreamweaver 8/Untitled-1" name="mainFrame" id="mainFrame" title="mainFrame" /> <frame src="file:///C|/Program Files/Macromedia/Dreamweaver 8/UntitledFrame-2" name="bottomFrame" scrolling="No" noresize="noresize" id="bottomFrame" title="bottomFrame" /> i have named the mainFrame and bottomFrame in this example so the too snippets of code you are adding are CODE id="mainFrame" and CODE id="bottomFrame" then when you go to make your hyperlinks, make sure you add a target (the same as your ID before) CODE <a href="http://www.google.com" target="bottomFrame">Link to Frame </a> good luck -jimmy It's correct what you said but it is not absolutely necesary the use of the id use it if you want, just use the name property and do the same with your hyperlinks as Jimmy post below. Best regards, |
|
|
|
![]() ![]() |
Similar Topics
| Topics | Topics | |
|---|---|---|
|
|
|
|
Lo-Fi Version | Time is now: 30th August 2008 - 04:20 AM |