QUOTE (colemancb @ Dec 5 2007, 05:39 PM)

Hey there...
Just fiddling around with an idea me and a buddy have, and what the site will require is users clicking a link, or a button, getting a prompt, and taking what the user entered and placing that data on the page after some modifications. Sounds simple, and I'm sure it is. But, in what I've read and tested out myself, everytime I use the document.write method, it overwrites the entire page instead of just adding on. After more reading, I thought that using the 'getElementbyID' and 'innerHTML' methods would solve my problem by placing the output inside a DIV, but no go. Anyone have any advice on this?
I do not know if this is what you wanted but here is what it does.
1\ Text box to add text
2\ Submit button
3\ A Div that set to be hidden
If you press the submit button and the text box is empty it will say text needed message
If the text box has text in it and you press the submit button below the text box what
you have just type in will appear. Also the button text changes from submit to clear
Save As Demo_ShowText.html
QUOTE
CODE
<HTML></HEAD>
<TITLE>Demo - Show Text</TITLE>
<STYLE Type='text/css'>
.Text1
{
Font-Family:verdana;
Font-Size:8.05pt;
Font-Weight:Bold;
Color:#007373;
}
</STYLE>
<script LANGUAGE='JScript'>
function ShowText()
{
if(DisplayText.style.visibility=="hidden")
{
if(TBox1.value=="")
{
alert("Please Input Some Text");
}
else
{
DisplayText.style.visibility=""
DisplayText.innerHTML="<FONT CLASS='Text1'>"+
"Your Input Was » "+TBox1.value+"</FONT>";
Btn01.value='Clear'
}
}
else
{
DisplayText.style.visibility="hidden";
Btn01.value='Submit'
TBox1.value=""
}
}
</SCRIPT>
</HEAD><BODY>
<!-- Text Box -->
<INPUT Type='TextBox' ID='TBox1'
Class='Text1'
Style='Color:#000060;Margin-Right:2px;'>
<!-- Button -->
<INPUT Type='BUTTON' ID='Btn01'
Class='Text1'
Style='Height:21px;Width:63px;Color:#010101;'
OnClick='ShowText()'
value='Submit'>
<!-- Display Text -->
<DIV ID='DisplayText'
Style='visibility:hidden;position:absolute;Top:48;Left:48;'></DIV>
</BODY></HTML>