Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to make links work with Frames?

Status
Not open for further replies.

egims

Technical User
Jun 5, 2001
96
US
I have designed a web page using frames for the first time. The page displays almost (needs a tweek) fine, but when you click on any of the links accross the top of the page nothing seems to happen even though you can see the URL, and see the browser think.

Can somebody tell me how to make the link work and the page change when the links are clicked upon? The URL is:


Thanks
 
Every frame of your has an attribute called [tt]name[/tt]. Check them out. The link tag (<a>) takes another attribute, which is [tt]target[/tt]. All you need to do is add this target attribute to all your links and the value of the attribute should be the name of the frame you wish to open the link. For example, you have a frame called "main". You should add this to all of your links in the navigation:
Code:
<a href="index.shtml" onmouseover="
               document.home_but1.src='images/home_but2.jpg'" onmouseout="
               document.home_but1.src='images/home_but1.jpg'"><img src="
               images/home_but1.jpg" width="92" height="30" border="0" alt="Home" name="
               home_but1" [b]target="main"[/b]></a>
 
I think Vrag meant to say this:
Code:
<a href="index.shtml" [b]target="main"[/b] onmouseover="document.home_but1.src='images/home_but2.jpg'" onmouseout="document.home_but1.src='images/home_but1.jpg'"><img src="images/home_but1.jpg" width="92" height="30" border="0" alt="Home" name="home_but1"></a>


-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
Ooops, yeah. Thanks Chris, didn't see that <a> ending and <img /> beginning. Another reason why closing every element is a good thing :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top