When write in textbox, words are displayed in the same page
-
Hello codeproject professionals, Please help me in : "When I write in a textbox, I want to show the words written in the same page without posting the page". The process is occurring simultaneously that is: "When a user is writing in the textbox, the words written I can make them displayed in the same page in other place". See example: Ex: http://tareemnet.com/os.png
modified on Sunday, April 18, 2010 9:30 AM
-
Hello codeproject professionals, Please help me in : "When I write in a textbox, I want to show the words written in the same page without posting the page". The process is occurring simultaneously that is: "When a user is writing in the textbox, the words written I can make them displayed in the same page in other place". See example: Ex: http://tareemnet.com/os.png
modified on Sunday, April 18, 2010 9:30 AM
? What are you asking? Of course the words appear in the same page, you wouldn't be able to see them otherwise. Please be a little more specific, we are here to help, but we cannot read minds.
------------------------------------ I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
-
? What are you asking? Of course the words appear in the same page, you wouldn't be able to see them otherwise. Please be a little more specific, we are here to help, but we cannot read minds.
------------------------------------ I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
I edited the question
-
I edited the question
When you look at the source code, the HTML is there for you to see. As is any references to javascript. Look for that textbox and see where the code employed takes you. Then ask again where you get stuck. But don't forget to include an example of code where you are stumped (note NOT all the code - just the relevant bits which stumps you).
-
Hello codeproject professionals, Please help me in : "When I write in a textbox, I want to show the words written in the same page without posting the page". The process is occurring simultaneously that is: "When a user is writing in the textbox, the words written I can make them displayed in the same page in other place". See example: Ex: http://tareemnet.com/os.png
modified on Sunday, April 18, 2010 9:30 AM
Here is a very simple example ...
<script>
func=function (arg){
d = document.getElementById("div1")
d.innerHTML = arg.value
}
</script>
<body>
<div id="div1"></div>
<input type="textbox" onkeyup="func(this)">
</body>Hope it helps.
-
Hello codeproject professionals, Please help me in : "When I write in a textbox, I want to show the words written in the same page without posting the page". The process is occurring simultaneously that is: "When a user is writing in the textbox, the words written I can make them displayed in the same page in other place". See example: Ex: http://tareemnet.com/os.png
modified on Sunday, April 18, 2010 9:30 AM
You would have to monitor the text boxes' onKeyUp event. For every invoke of the event you would copy the content of the respective text box and represent in the respective area. Example:
/**
* variable x is the id of the text box you want copied
* and y is the id of the tag you want the text box's value to be copied to
**/function copy(x,y)
{
var text=document.getElementById(x).value;
document.getElementById(y).innerText = text;
}The above should be placed in a script tag preferably within your head tag. Then add the following code to the respective textboxes: