View Full Version : help needed
sweetboy
04-25-2007, 06:47 AM
hi all,
i'm developing a webpage.In that left side i'm having menu with links..
in right side i'm having '<div>' area.how to display the contents in the div area for the corresponding links...
any one give me a clear idea?
reply soon.....
:)
djr33
04-25-2007, 08:00 AM
I'm not clear what you mean.
You want to put the same content in two places?
I believe you can use a script on Dynamic Drive if you want to have the 'content' of a link appear in another area on the page. Take a look through the scripts available.
sweetboy
04-25-2007, 08:09 AM
hi left side i'm having menu and i want to display the contents for the links(that is i retrive the contents from the another file and display it within the same page )in the right side <div> area..
can u get me?
codeexploiter
04-25-2007, 08:19 AM
Try the following code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
#container
{
width: 90%;
margin: 10px auto;
background-color: #fff;
color: #333;
border: 1px solid gray;
line-height: 130%;
}
#top
{
padding: .5em;
background-color: #ddd;
border-bottom: 1px solid gray;
}
#top h1
{
padding: 0;
margin: 0;
}
#leftnav
{
float: left;
width: 160px;
margin: 0;
padding: 1em;
}
#rightnav
{
float: right;
width: 160px;
margin: 0;
padding: 1em;
}
#content
{
margin-left: 200px;
border-left: 1px solid gray;
margin-right: 200px;
border-right: 1px solid gray;
padding: 1em;
height:300px;
}
#footer
{
clear: both;
margin: 0;
padding: .5em;
color: #333;
background-color: #ddd;
border-top: 1px solid gray;
}
</style>
<script type="text/javascript">
function clicked(url)
{
document.getElementById('ifr').style.display = "block";
document.getElementById('ifr').src = url;
}
</script>
</head>
<body>
<div id="container">
<div id="top">
<h1>Header</h1>
</div>
<div id="leftnav">
<p>
<a href="#" onclick="clicked('http://www.google.com');">Google</a><br />
<a href="#" onclick="clicked('http://www.dynamicdrive.com');">Dynamic Drive</a><br />
<a href="#" onclick="clicked('http://www.yahoo.com');">Yahoo!</a><br />
<a href="#" onclick="clicked('http://www.phpfreaks.com');">PHPFreaks</a><br />
<a href="#" onclick="clicked('http://www.amazon.com');">Amazon</a><br />
</p>
</div>
<div id="rightnav">
<p>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut.
</p>
</div>
<div id="content">
<iframe src="" frameborder="0" id="ifr" width="465" height="300" style="display:none;"></iframe>
</div>
<div id="footer">
Footer
</div>
</div>
</body>
</html>
Click the links available in the left portion of the page the resulting page will be open in the middle portion (as it has more width than the right side in my page).
If this is what you are looking for then it can be customized in such a way that the links will be opened in the right portion rather than the middle one
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.