Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5

Thread: Dynamic content

  1. #1
    New Coder
    Join Date
    May 2005
    Posts
    63
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Exclamation Dynamic content

    Hello. I have several problems which all stem from one central design feature: dynamic content.

    I want my left-hand navigation links to change color according to the page I'm on. But since I'm using dynamic content, I don't know how to change it because the links are always on the same page. If some smart person could please tell me how to pass another argument to my function so as to accomplish this, I would be most appreciative.

    Here is my code:

    Code:
    <script type="text/javascript">
    <!--
    
    function show_me(b3, b2){
    
    document.getElementById("box3").innerHTML=document.getElementById(b3).innerHTML
    document.getElementById("box2").innerHTML=document.getElementById(b2).innerHTML
    
    }
    
    //-->
    </script>
    
    <div id="box1">
    <a href="#null" onclick="show_me('contact', 'quote1')" title="">TESTIMONIALS</a>
    ....and so on.

  • #2
    Regular Coder
    Join Date
    Apr 2004
    Posts
    102
    Thanks
    0
    Thanked 0 Times in 0 Posts
    its on the same page? What is that suppose to mean.
    What argument are you passing?

    Code:
    <script type="text/javascript">
    <!--
    
    function show_me(b3, b2, another){
    
    document.getElementById("box3").innerHTML=document.getElementById(b3).innerHTML
    document.getElementById("box2").innerHTML=document.getElementById(b2).innerHTML
    
    }
    
    //-->
    </script>
    
    <div id="box1">
    <a href="#null" onclick="show_me('contact', 'quote1', 'Another Argument')" title="">TESTIMONIALS</a>
    Since you didnt state what the other argument was to be, I only showed you how to add another.

  • #3
    New Coder
    Join Date
    May 2005
    Posts
    63
    Thanks
    1
    Thanked 0 Times in 0 Posts
    its on the same page? What is that suppose to mean.
    If I were not using dynamic content, I would have more than one html file. As I am using dynamic content, I have only one html file and, thus, no way to change the color of the link for the corresponding div that will appear. None that I know of anyway.

    What argument are you passing?
    I was hoping you could tell me.

    Since you didnt state what the other argument was to be, I only showed you how to add another.
    Next, could you show me how to add a fourth?

  • #4
    Regular Coder
    Join Date
    Apr 2004
    Posts
    102
    Thanks
    0
    Thanked 0 Times in 0 Posts
    How is dynamic content more than one HTML file? Sounds more like frames to me. Maybe you should elaborate more. What do you want the 3 argument to be?

    Next, could you show me how to add a fourth?
    Im guessing your being sarcastic, but anyway to add a fourth you do exactly what I did with a third.

  • #5
    New Coder
    Join Date
    May 2005
    Posts
    63
    Thanks
    1
    Thanked 0 Times in 0 Posts
    How is dynamic content more than one HTML file?
    It's not.

    Sounds more like frames to me.
    Functionally it is more or less the same, but no.

    Maybe you should elaborate more.
    Maybe.

    What do you want the 3 argument to be?
    I want it to be something that will change the color of the links in the left panel based on the current dynamic div.


  •  

    Posting Permissions

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