PDA

View Full Version : How to create Navigation?



cute
05-21-2007, 06:24 AM
hi all,
In a web page there is a <div> area, in that i read the content of a file. in that file also navigation link present.if i click on that link it will open in new window.but i need to open that file in the same <div >area. how can i achieve this.
example
<div>
<?php html file reading ?>
in html file <a>one</a><a>two></a>
</div>
if i click 'one' that contenet should be displayed in the same <div> Area
can any one help me plz..
thanks.

Bob90
05-21-2007, 08:01 AM
Yes try this



<div>
<span id="span1"><?php html file reading ?><span>
in html file <a href="Javascript:fillSpan(1)">one</a><a>two></a>
</div>

<script>
content = ["","Hello world","Content 2","content 3"]

function fillSPan(num)
{
document.getElementById("span1").innerHTML = content[num]
}

</script>