Forum Moderators: open

Message Too Old, No Replies

Display text on the right side while customer types on the input boxes

         

Habtom

11:22 am on May 30, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I found this to be so important that I thought of getting a response for it here.

I want text to be displayed on the right of the text box while a visitor is typing the same text on an the text box of a website.

Please share your ideas on how I can do this.

Habtom

birdbrain

4:17 pm on May 30, 2005 (gmt 0)



Hi there Habtom,

do you mean like this...


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>copy text</title>

<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />

<style type="text/css">
/*<![CDATA[*/
#text {
border:1px solid #999;
font-family:verdana,arial,helvetica,sans-serif;
font-size:12px;
color:#000;
float:left;
}
#foo {
width:324px;
height:200px;
border:1px solid #999;
background-color:#eef;
margin-left:20px;
padding:10px;
float:left;
font-family:verdana,arial,helvetica,sans-serif;
font-size:24px;
color:#999;
overflow:auto;
}
/*//]]>*/
</style>

<script type="text/javascript">
//<![CDATA[
function writeThere(text) {
document.getElementById('foo').innerHTML=text;
}
//]]>
</script>

</head>
<body>

<form action="#">
<div>
<input id="text" type="text" onkeyup="writeThere(this.value)"/>
</div>
</form>
<div id="foo"></div>

</body>
</html>

birdbrain