E
EnjoyNews
Hi
I have a little probelm.
I tranfer som data from input fields to a div so you can see how a profil
will look as you type in your data.
I just put this in my input field:
onkeyup="document.getElementById('javao').innerHTML=this.value;"
And this : <span id="javao"></span> somewhere else on the page.
This works fine and I also do the same thing with a textarea.
But... The breaks made in the textfield is not tranfered to the div.
I have search the net but can't seem to find anything about it. I have also
tried different solutions using nl2br and so on, but I just can't get it to
work.
So the quetion is, how do I transfer the the enter key from a textarea ?
I have a little probelm.
I tranfer som data from input fields to a div so you can see how a profil
will look as you type in your data.
I just put this in my input field:
onkeyup="document.getElementById('javao').innerHTML=this.value;"
And this : <span id="javao"></span> somewhere else on the page.
This works fine and I also do the same thing with a textarea.
But... The breaks made in the textfield is not tranfered to the div.
I have search the net but can't seem to find anything about it. I have also
tried different solutions using nl2br and so on, but I just can't get it to
work.
So the quetion is, how do I transfer the the enter key from a textarea ?