I have a website that includes two frames. One on the left for Table of contents and one on the right. The table of contents on the left is an expandable list which I implemented using jquery. Each of the final children is a hyperlink for another html that will be opened in the frame on the right.
The code for the left frame is as follows
<html>
<head>
<meta http-equiv="Content-Language" content="en-us"/>
<link rel="stylesheet" type="text/css" href="stylesheet/style.css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<title>User Manual</title>
<base target="mainFrame"/>
</head>
<body>
<h2>Table of Contents</h2>
<div class="listContainer">
<ul class="expList" id="expList">
<li><a href="intro.html">Introduction</a></li>
<li>Main Screen
<ul>
<li>
<a href="addInHouse.html">Add In-House Client</a>
</li>
</ul>
</li>
</ul>
</div>
<script>
function prepareList() {
$('#expList').find('li:has(ul)')
.click( function(event) {
if (this == event.target) {
$(this).toggleClass('expanded');
$(this).children('ul').toggle('medium');
}
return false;
})
.addClass('collapsed')
.children('ul').hide();
};
$(document).ready( function() {
prepareList();
});
</script>
</body>
</html>
The code of the parent html that contains the two frames is as follows
<html>
<head>
<title>User Manual</title>
<head>
<frameset border="10" cols="20%,80%" frameSpacing="10">
<frame name="navFrame" src="contents.html">
<frame name="mainFrame" src="main.html">
</frameset>
</html>
The issue that I am having is with the Add in house href. The introduction href when clicked works perfectly. While on the other hand when I click on add in house it does not open on the right frame. If I choose open in a new window it opens perfectly. Any thoughts?
**EDIT To explain better what I am trying to do this link leads to apache ant user manual. I am trying to create a user manual for my application that works exactly the same way. The only difference between the two is that my table of contents is an expandable list while in the apache ant user manual click on a category reloads the table of contents with the contents of the category instead of expanding set category which is what I am trying to do. My issue is that the href links inside the inner list contents of the expandable lists do not actually work
The base target code works as the mainFrame does not need to be in the same document of the contents html. It's inside the parent frame from which the left frame is running