javascript - update div/section by html (or php) after clicking on link on different div/section -
i update div/section of web page result of clicking on link section of web page
my html code far this: , stuck on how complete href tags , content section links tied content section/division. possible address bar reflect content being viewed (depending on links clicked) rather being stuck in address of original web page?
edit: clear: load html div upon clicking links
<html> <head> <title>example page</title> <link type="text/css" rel="stylesheet" href="style.css" /> <script type="text/javascript" charset="utf-8" src="http://code.jquery.com/jquery-latest.min.js"></script> </head> <body> <!-- top header bar --> <section id="header"> <div id="top_nav" style="color: #ffffff; padding: 5px 5px 5px 5px;text-shadow:10px 10px 10px blue"> <font size="6"><center>title</center></font> </div> </section> <section id="menu"> <div id="navigation"> <div id="menu"> <p<ul><font color=#ffffff face="verdana, arial, helvetica, sans-serif"><a><b>dashboard</b></a></font></ul> <ul><li><font face="verdana, arial, helvetica, sans-serif"><a href="./dashboard/display_global.php"<b>dashboard</b></a></font></ul> <ul><li><li><font face="verdana, arial, helvetica, sans-serif"><a href="./dashboard/graphs/metric_barchart.html" target="mycontent"><b>mdv bar chart</b></a></font></ul> </p> <p<ul><font color=#ffffff face="verdana, arial, helvetica, sans-serif"><a><b>spitfire i</b></a></font></ul> <ul><li><font face="verdana, arial, helvetica, sans-serif"><a href="qaweb_sf1/codec/codec.php" target="mycontent"><b>sfcodec</a></font></ul> <ul><li><font face="verdana, arial, helvetica, sans-serif"><a href="qaweb_sf1/ats/ats.html" target="mycontent">spitfire - ats</a></font></ul> <ul><li><font face="verdana, arial, helvetica, sans-serif"><a href="qaweb_sf1/latest_sf1dac.html" target="mycontent">sf1 dac</a></font></ul> <ul><li><li><font face="verdana, arial, helvetica, sans-serif"><a href="qaweb_sf1/dac_db/dac.php" target="mycontent">sf1 dac db</a></font></ul> <ul><li><li><font face="verdana, arial, helvetica, sans-serif"><a href="qaweb_sf1/decoder/front.php" target="mycontent">sf1 decoder</a></font></ul> </div> </div> </section> <section id=content> <div id="content"> content </div> </section> </body> </html>
this how resolved it:
<?php $page_title = "page title"; $css_link = '<link type="text/css" rel="stylesheet" href="../css/style.css"/>'; include_once($_server['document_root'] . "/banner.php"); ?> <section id="menu"> <div id="navigation"> <div id="menu"> <?php include($_server['document_root'] . "/menu.php"); ?> </div> </div> </secion> <section id="content"> <div id="content"> <base target="_blank" /> </div> </section> </body> </html> and have changed pages .php , have following template:
<?php $page_title = "soemthing set page title top_nav"; $css_link = '<link type="text/css" rel="stylesheet" href="../../css/style.css"/>'; include_once($_server['document_root'] . "/banner.php"); ?> <section id="menu"> <div id="navigation"> <div id="menu"> <?php include_once($_server['document_root'] . "/menu.php"); ?> </div> </div> </secion> <section id="content"> <div id="content"> <br> content here! </div> </section> </body> </html> so reloading , feel mantained, small website, adequate hope there more elegant solution this.
Comments
Post a Comment