Forum Moderators: open
</body>
</html>
======================
EXAMPLE TWO
<script type="text/javascript" LANGUAGE="Javascript">
<!--
function ReloadTextDiv()
{
var NewText = document.getElementById("DynamicText").value;
var DivElement = document.getElementById("TextDisplay");
DivElement.innerHTML = NewText;
}
//-->
</script>
To display the Live Preview enter:
<span id="TextDisplay"></span>
Inside the input text tag for your field, add these two attributes:
id="DynamicText" onKeyUp="ReloadTextDiv();"
(your tag may look something like this:
<input type="text" name="email" Value="email" size="20" maxlength="40" id="DynamicText" onKeyUp="ReloadTextDiv();">
Thank you for your time.
<script type="text/javascript" LANGUAGE="Javascript">
<!--
function ReloadTextDiv(textName,divName)
{
var NewText = document.getElementById(textName).value;
var DivElement = document.getElementById(divName);
DivElement.innerHTML = NewText;
}
//-->
</script>
To display the Live Preview enter:
<span id="TextDisplay1"></span>
<span id="TextDisplay2"></span>
<span id="TextDisplay3"></span>
Inside the input text tag for your fields, add these two attributes:
id="DynamicText1" onKeyUp="ReloadTextDiv('DynamicText1','TextDisplay1');"
(your tags may look something like this:
<input type="text" name="email" Value="email" size="20" maxlength="40" id="DynamicText1" onKeyUp="ReloadTextDiv('DynamicText1','TextDisplay1');">
<input type="text" name="name" Value="name" size="20" maxlength="40" id="DynamicText2" onKeyUp="ReloadTextDiv('DynamicText2','TextDisplay2');">
<input type="text" name="postcode" Value="postcode" size="20" maxlength="40" id="DynamicText3" onKeyUp="ReloadTextDiv('DynamicText3','TextDisplay3');">
How it works: The onKeyUp event for each field passes two arguments to the ReloadTextDiv function: the first is the id of the text field, the second is the id of the span to be updated. The function uses these arguments to get the value of the correct text field and put it in the correct span. There are other (probably better) ways to do this but this quick modification should do you for now!