tansqrx 0 Report post Posted February 9, 2007 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. 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? Share this post Link to post Share on other sites
jimmy89 0 Report post Posted February 9, 2007 (edited) 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 <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 exampleso the too snippets of code you are adding areid="mainFrame"andid="bottomFrame" then when you go to make your hyperlinks, make sure you add a target (the same as your ID before)<a href="http://google.com; target="bottomFrame">Link to Frame </a> good luck-jimmy Edited February 9, 2007 by Jimmy89 (see edit history) Share this post Link to post Share on other sites
TavoxPeru 0 Report post Posted February 11, 2007 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 <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 exampleso the too snippets of code you are adding areid="mainFrame"andid="bottomFrame" then when you go to make your hyperlinks, make sure you add a target (the same as your ID before)<a href="http://google.com; target="bottomFrame">Link to Frame </a> good luck-jimmyIt'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, Share this post Link to post Share on other sites