burger
05-02-2003, 03:57 AM
Hi,
I'm using frames in my pages, a menu and content frame. In the menu frame I want to change an image and the title of the page with the same link. I can make each event change using onclick but different links, is there a way to make the 2 events change with one link using onclick?
Thanks
The script below:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script>
function changeTitle(newTitle) {
top.document.title=newTitle;
}
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p><img name="aog" src="image1.jpg" width="100" height="100"></p>
<p><a href="content.htm" onclick='aog.src="image1.jpg"' target="mainFrame">Page One</a></p>
<p><a href="content2.htm" onclick='aog.src="image2.jpg"' target="mainFrame">Page Two</a></p>
<p><a href="content.htm" onclick="changeTitle('Page One');" target="mainFrame">Page One</a></p>
<p><a href="content2.htm" onclick="changeTitle('Page Two');" target="mainFrame">Page Two</a></p>
</body>
</html>
I'm using frames in my pages, a menu and content frame. In the menu frame I want to change an image and the title of the page with the same link. I can make each event change using onclick but different links, is there a way to make the 2 events change with one link using onclick?
Thanks
The script below:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script>
function changeTitle(newTitle) {
top.document.title=newTitle;
}
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p><img name="aog" src="image1.jpg" width="100" height="100"></p>
<p><a href="content.htm" onclick='aog.src="image1.jpg"' target="mainFrame">Page One</a></p>
<p><a href="content2.htm" onclick='aog.src="image2.jpg"' target="mainFrame">Page Two</a></p>
<p><a href="content.htm" onclick="changeTitle('Page One');" target="mainFrame">Page One</a></p>
<p><a href="content2.htm" onclick="changeTitle('Page Two');" target="mainFrame">Page Two</a></p>
</body>
</html>