Results 1 to 2 of 2

Thread: How to create Navigation?

  1. #1
    Join Date
    Apr 2007
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy How to create Navigation?

    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.

  2. #2
    Join Date
    Feb 2007
    Location
    England
    Posts
    254
    Thanks
    0
    Thanked 5 Times in 5 Posts

    Default

    Yes try this

    Code:
    <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>

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •