...

View Full Version : Dynamic content



cmw000
07-01-2005, 04:56 AM
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:


<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.

gsoft
07-01-2005, 05:28 AM
its on the same page? What is that suppose to mean.
What argument are you passing?



<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.

cmw000
07-01-2005, 05:48 AM
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?

gsoft
07-01-2005, 05:54 AM
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.

cmw000
07-01-2005, 06:00 AM
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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum