wackyflik Posted October 2, 2006 Share Posted October 2, 2006 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 & Web Programming <br /> Copyright © 2006 </p> </div></div></body>[/code] Quote Link to comment https://forums.phpfreaks.com/topic/22769-open-new-page-through-hyperlinks-in-the-tag/ Share on other sites More sharing options...
Daniel0 Posted October 2, 2006 Share Posted October 2, 2006 I don't get your question, could you provide more details please? And it seems like it's more like a HTML question... Quote Link to comment https://forums.phpfreaks.com/topic/22769-open-new-page-through-hyperlinks-in-the-tag/#findComment-102514 Share on other sites More sharing options...
wackyflik Posted October 2, 2006 Author Share Posted October 2, 2006 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] Quote Link to comment https://forums.phpfreaks.com/topic/22769-open-new-page-through-hyperlinks-in-the-tag/#findComment-102737 Share on other sites More sharing options...
ToonMariner Posted October 3, 2006 Share Posted October 3, 2006 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 usedocument.getElementById('content').innerHTML = newcont;where new cont is all the html you want in there. Quote Link to comment https://forums.phpfreaks.com/topic/22769-open-new-page-through-hyperlinks-in-the-tag/#findComment-102926 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.