gracias livin y luego... cómo usaría esa variablen en esta función??
Código:
<script type="text/javascript">
var nombre_txtArea="Comentarios";
function nombreArea(nombre){
nombre_txtArea = nombre.toString();
}
function addtext(str) {
var cadena = str.toString();
cadena = cadena.split("><");
if (cadena.length != 1) {
etiqueta = cadena[0] + ">";
cierre = "<" + cadena[1];
} else {
etiqueta = str.toString();
cierre = "";
}
theSelection = document.selection.createRange().text;
if (!theSelection)
document.getElementById('nombre_txtArea').value += str;
if (document.selection.createRange().parentElement().tagName == 'TEXTAREA')
document.selection.createRange().text = etiqueta + theSelection + cierre;
}
function help(help){
document.registro.helpb.value = help;
}
</script>
es en esta línea donde la he de usar... pero me da error con y sin la comilla simple...
Código:
document.getElementById('nombre_txtArea').value += str;
gracias again ;)