Jump to content

Archived

This topic is now archived and is closed to further replies.

wackyflik

Open new page through hyperlinks in the <div> tag.

Recommended Posts

how do i open any webpages by clicking hyperlinks located at the left side and the page will be displayed in the <div="content"> tag instead of using <iframe>? here is my code:

[code]<body>
<div id="container">
<div id="banner">
<h1>Banner</h1>

</div>
<div id="nav">
<p>Welcome, <?php echo $_SESSION['user']; ?> [<a href="../auth/logout_process.php">Sign Out</a>]</p>
<p>
<div id="list-menu">
<ul>
<li><a href="default_menu.html" target="content">Home</a></li>
<li><a href="about_us.html" target="content">About Us</a></li>
<li><a href="../faculty/form_faculty.php?op=add" target="content">Add New Faculty</a></li>
<li><a href="../faculty/view_faculty.list.php" target="content">Lists of Faculties</a></li>
<li><a href="../program/form_program.php?op=add" target="content">Add New Program</a></li>
<li><a href="../program/view_program.list2.php" target="content">Lists of Programs</a></li>
<li><a href="../student/form_student.php" target="content">Add New Student</a></li>
<li><a href="../attendance/form_attendance.php" target="content">Add New Attendance</a></li>
<li><a href="../attendance/view_all_bydate.php" target="content">View Attendance List</a></li>
</ul>
</div>
</p>

</div>
<div id="content">
<!-- display webpages here -->
</div>
<div id="footer">
<p>
Master of Science in Information Technology
<br />
ITT 751 - Advanced Internet &amp; Web Programming
<br />
Copyright &copy; 2006
</p>
</div>
</div>
</body>[/code]

Share this post


Link to post
Share on other sites
I don't get your question, could you provide more details please? And it seems like it's more like a HTML question...

Share this post


Link to post
Share on other sites
like this, i am using CSS for my layout design which is totally different from the previous website. here is the hyperlinks that i have:

[code]<div id="list-menu">
<ul>
<li><a href="default_menu.html" target="content">Home</a></li>
<li><a href="about_us.html" target="content">About Us</a></li>
<li><a href="../faculty/form_faculty.php?op=add" target="content">Add New Faculty</a></li>
<li><a href="../faculty/view_faculty.list.php" target="content">Lists of Faculties</a></li>
<li><a href="../program/form_program.php?op=add" target="content">Add New Program</a></li>
<li><a href="../program/view_program.list2.php" target="content">Lists of Programs</a></li>
<li><a href="../student/form_student.php" target="content">Add New Student</a></li>
<li><a href="../attendance/form_attendance.php" target="content">Add New Attendance</a></li>
<li><a href="../attendance/view_all_bydate.php" target="content">View Attendance List</a></li>
</ul>
</div>[/code]

if u can see, there is a target in the <a> tag which is [b][u]content[/u][/b]. i want when i click any of the hyperlinks, the page will be displayed in the:

[code]
<div id="content">
<!-- display webpages here -->

</div>[/code]

Share this post


Link to post
Share on other sites
What you are trying to achieve applies to framsets.

You need to use ajax to do what you want to do. Grab the nwe content and then use

document.getElementById('content').innerHTML = newcont;

where new cont is all the html you want in there.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.