Frame Links

liunx

Guest
Hi, I've been working really hard lately on getting a site up for my band. I'd like to ask for some help on the simple coding of opening a link in a frame INSIDE the same window. For example, I have the normal frame with all the menus, and then an frame within that displaying the content. What is the code so that when a link is clicked the target is displayed in that inner frame? <br />
I will not PAY anyone for this...but I'll give credit on the site. Thank you very much.<!--content-->Originally posted by homestar <br />
Hi, I've been working really hard lately on getting a site up for my band. I'd like to ask for some help on the simple coding of opening a link in a frame INSIDE the same window. For example, I have the normal frame with all the menus, and then an frame within that displaying the content. What is the code so that when a link is clicked the target is displayed in that inner frame? <br />
I will not PAY anyone for this...but I'll give credit on the site. Thank you very much. <br />
<br />
gotta post some code or a URL if you really want help.i dont quite get what youre saying.<!--content-->Originally posted by homestar<br />
I will not PAY anyone for this...but I'll give credit on the site<br />
<br />
<br />
Hey no need - we'll tell you for free and you don't even need to credit us. We're just nice like that.<br />
<br />
<br />
I think what you mean is that right now, when you click on a link in your menu frame it either opens the page in that frame, or a new window?<br />
<br />
What you need to do is name you main content frame in the frameset page:<br />
<br />
<br />
<frame src=http://www.htmlforums.com/archive/index.php/"home.html" name="main"><br />
<br />
<br />
add whatever other attributes you need - but you get the idea.<br />
<br />
<br />
Next - for all the links in your menu that you want to open into the main frame, add a target attribute:<br />
<br />
<br />
<a href=http://www.htmlforums.com/archive/index.php/"content.html" target="main">Click Me</a><br />
<br />
<br />
again, add other attributes where you want.<br />
<br />
The idea is that you are telling the browser which frame to load the page into, ok?<br />
<br />
There are some special pre-defined targets, the most useful being:<br />
<br />
target="_blank" : creates a new window<br />
target="_top" : fills the current window (removes frames)<br />
<br />
Hope this is what you are after - and welcome to the forums, too.<!--content-->
 
Back
Top