FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

Changing javascript caption?

 


Diablosblizz
Hey, I have a variable in Javascript (called show) and I want it to change each time somebody clicks a link (will be defined)

Something like:

Code:
<script>
show = document.write("Home");
</script>


Then one somebody clicks a link then the document.write will change to something like News. It's supposed to be a header, except it's not in <head> and I am using iframes for my pages. (Don't tell me that I shouldn't, just accept the fact that I am)

Does anybody know how to do this?

Thanks.
SamiTheBerber
Diablosblizz wrote:
Hey, I have a variable in Javascript (called show) and I want it to change each time somebody clicks a link (will be defined)

Something like:

Code:
<script>
show = document.write("Home");
</script>


Then one somebody clicks a link then the document.write will change to something like News. It's supposed to be a header, except it's not in <head> and I am using iframes for my pages. (Don't tell me that I shouldn't, just accept the fact that I am)

Does anybody know how to do this?

Thanks.

I suggest you to use document.getElementById("id_text").innerHTML="Text you want";
Reply to topic    Frihost Forum Index -> Scripting -> Html, CSS and Javascript

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.