Web page links

Soldato
Joined
1 Dec 2004
Posts
22,552
Location
S.Wales
How do you target a link to a specified div on the same page?

e.g. the link will be in the left div, when clicked it will open up a page in the right div?
 
if you are linking to somewhere else on a page. then it is

Code:
<a href="#link">link</a>




<a name="link">Link</a>

Dont quite fully understand what you mean but if you want it to go to another page then just add the page filename before the hash so:

Code:
 <a href="page.html#link">link</a>

Sorry if i have the wrong end of the stick here
 
basically yes, i have 3 tables in my DB, atm i know how to output 1 table per page, i need to find a way to create the links on the left, so that when a link is clicked it will update the right div with the table output for that specified department.
 
Because i cant get on with anything till i find out if its possible or not, iv given up searching on the net because all it returns is results about frames/iframes
 
Code:
<?php
if(isset($_GET["show"]))
{
$show = $_GET["show"];

switch($show)
{
case "DVD":
$load = "dvd";
break;

case "Video":
$load = "video";
break;

default:
$load = "default";
}//End of switch($show)

//Load the page outputted from the switch statement
require_once "$load.php";

}//End of if(isset($_GET["show"]))
else
{
require_once "default.php";
}
?>
 
Back
Top Bottom