You are here: Re: Framesets ? « HTML « IT news, forums, messages
Re: Framesets ?

Posted by jojo on 06/19/06 19:47

What about using CSS to hide the parts of the right page which should
not be visible and using JavaScript to make them visible?

RIGHT FRAME:
<html>
<head>
<title>SomeTitle</title>
<style type="text/css">
#Content1{display:block}
#Content2{display:none}
#Content3{display:none}
</style>
<script type="text/javascript" language="javascript">
function showContent(n){
for (i=1; i<=3; i++){
document.getElementById("Content"+1).style.display="none"
}
document.getElementById("Content"+n).style.display="block"
}
</script>
</head>
<body>
<div id="Content1">Content 1</div>
<div id="Content2">Content 2</div>
<div id="Content3">Content 3</div>
</body>
</html>


Now a link in the left frame has to look like this (if right frame is
named "right"):

<a href="javascript:parent.right.showContent(1)>ShowContent1</a>
<a href="javascript:parent.right.showContent(2)>ShowContent2</a>
<a href="javascript:parent.right.showContent(3)>ShowContent3</a>

I think this should work, but I haven't tested yet.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация