Click to See Complete Forum and Search --> : Newb Question? Changing text dynamically on a page.


Digithead
08-29-2005, 08:57 PM
Hi all...

Forgive the newb question, but I'm just starting to do this design stuff in my free time.

I was wondering if there was a way to have a person type in some text somewhere on a page, and have that text replace another section of text.

Example:

If a section says "Hello World", and a person goes to a portion of the page (not necessarily the same page) and types in "Goodbye Cruel World", "Hello World" gets replaced...Automagically? possible?

Don't wanna get crazy w/ this...Using Frontpage to play around on... Don't have a database, not interested in forms, would like to stay away from JS...simple and effective is what I'm after.

Thanks in advance.

Digit

studbuckman
08-29-2005, 09:15 PM
What you are after is not doable through HTML. HTML is a static language, and cannot be used in dynamic situations such as the one you are describing.

Digithead
08-29-2005, 09:27 PM
Suggestions for a Dynamic? language...be gentle..I'm new at this

Wisest Guy
08-29-2005, 09:34 PM
The easiest way to do this is using JavaScript. Feel free to try not to look at the code below.

In the body:
<SPAN ID="SPAN"></SPAN>
<INPUT TYPE=BUTTON VALUE="Change text" ONCLICK="Text()">
<SCRIPT LANGUAGE="JavaScript">
function Text()
{document.getElementById("SPAN") = "New text";}
</SCRIPT>
Thus ending the code.

Digithead
08-29-2005, 09:41 PM
Thanks All...I'll play around w/ Wisest Guys offering and see what I come up w/

Digit